本文へスキップ

PDF を CSV に変換

PDF の中の表を、カンマ区切りのファイルとして取り出します。

お使いの端末で処理

このツールはブラウザーの中だけで動きます。ファイルがアップロードされることはなく、そのことはブラウザーのネットワークタブでご自身で確認できます。 ご自分で確かめてください。ブラウザーのネットワークタブを開いて見てください。残りの作業回数を尋ねる小さなリクエストが1つだけ表示されます。ツール名とハッシュだけで、ファイルは決して含まれません。

このツールでできること

A PDF has no idea what a table is. There are no cells and no rows in the file, only text placed at coordinates that happen to line up, so recovering a table means finding the columns again. This tool clusters the horizontal positions of every text run, looks for a stretch of lines whose runs all fall into the same bands, and writes what it finds as CSV. Because it is inference rather than reading, every table comes with a confidence score, and the threshold is yours to set.

The usual case is numbers you would otherwise retype: a bank statement that only arrives as a PDF, invoice lines that have to be reconciled, a price list from a supplier, or an export from a system that offers PDF and nothing else.

仕組み

  1. Drop the PDF onto this page. If it is a scan with no text layer, you are sent to OCR PDF rather than given an empty spreadsheet.
  2. Pick the delimiter. Comma is standard; semicolon is what Excel expects in most of Europe; tab suits pasting straight into a sheet.
  3. Set the confidence threshold. 55 per cent is the default; lower it to catch loosely aligned tables, raise it if prose is being mistaken for one.
  4. Choose one file per table, or a single file with the tables one after another.
  5. Press Extract tables. Each output shows its page and its confidence, so a doubtful table is visible as doubtful before you use it.

The detail that separates a table detector that works from one that does not is right alignment. Number columns are set flush right, so their runs share an end position rather than a start position, and a detector that clusters only on where text begins misses every financial table - which is most of what anybody converts. Both edges are clustered here.

Nothing is returned below the confidence threshold, and that is a deliberate refusal rather than a gap. A spreadsheet full of misaligned fragments looks like a result and is worse than no result, because someone will use it.

The threshold is a real dial. At 30 per cent almost any run of aligned lines is offered, which is useful for a loosely typeset table you already know is there. At 90 per cent only tables with clean, consistent columns survive, which is what you want when converting a hundred pages unattended. The default of 55 is where a typical report's tables come through and its paragraphs do not.

Detection and writing both happen in your browser. The numbers in a bank statement are about as sensitive as a document gets, and none of them are transmitted: the PDF is read and the CSV written without any part of either reaching a network.

このツールにできないこと

  • Ruling lines are ignored. Columns are found from where the text sits, so a heavily bordered table whose text does not line up is still missed, and a table with no borders at all converts fine as long as it is aligned.
  • Merged and spanning cells flatten. A cell spanning three columns is written into one of them and the rest are left empty, because CSV has no way to say that a cell covers more than one column.
  • A scanned table has no text to cluster, so nothing is found. Run OCR PDF first to add a text layer, then come back.

よくある質問

表はどうやって見つけているのですか?
位置関係から判断します。表は、文字が同じ縦の帯に収まる行が連続する塊として現れます。各行の左右両端をクラスタリングしているのは、数値の列が右揃えで、そうしないと検出器から見えないためです。候補ごとに確信度を出し、設定したしきい値を下回るものは、推測せずに捨てます。
明らかにある表を取りこぼしました。どうすればよいですか?
確信度のしきい値を下げてください。40 パーセントにすると、既定では弾かれる、揃いの緩い表のほとんどを拾えます。それでも変わらない場合、その表の文字はそもそも列として並んでいない可能性が高く、セルの中で大きく折り返されているときによく起こります。PDF をテキストに変換すれば、少なくとも手作業で扱える中身は得られます。
区切り文字はどれを選べばよいですか?
ヨーロッパ版の Excel 以外に取り込むならカンマです。お使いの地域で小数点にカンマを使うならセミコロンにしてください。その場合、Excel はセミコロン区切りを読み、カンマ区切りのほうを壊してしまいます。開いている表計算にそのまま貼り付けるなら、タブがいちばん安全です。
スキャンしたページの表も読み取れますか?
そのままでは読み取れません。スキャンは画像なので、クラスタリングする文字の位置が存在しません。先に「PDF を OCR 処理」を実行すれば表を検出できるようになります。ただし数字に対する OCR の精度は、信用する前にセル単位で確認する価値があります。
ファイルはどこかにアップロードされますか?
いいえ。PDF の読み取りも CSV の書き出しも、すべてブラウザ内で行われます。銀行の明細や給与の表が、開いた端末から出ていくことはありません。アカウントも 1 日あたりの上限もなく、接続を切った状態でも動作します。

関連ツール