How to use the PDF table extractor
- Drop a PDF onto the box or press Choose a file.
- Enter the Page that holds the table (default 1).
- Press Extract table.
- Check the table view against the PDF, then download it as a CSV or copy the CSV text. Files are named after your PDF, for example
statement-page-3.csv.
What it does and when to use it
Bank statements, price lists, timetables and invoices often arrive as PDFs, but you need the figures in a spreadsheet. Copying from a PDF reader usually pastes each row as one jumbled line. This tool tries to restore the grid so each value lands in its own cell.
It is designed for text-based PDFs made by software, where every cell’s text has a known position. For everything else on the page, such as paragraphs and headings, the PDF text extractor is a better fit.
How it works
pdf.js (pdfjs-dist) reads the page’s text layer in your browser. Then the tool works only with positions:
- Pieces of text on the same baseline are grouped into lines.
- Each line is split into cells wherever the horizontal gap between pieces of visible text is wider than about one character (1.1 × the font size). Space-only pieces are skipped, because pdf.js often stretches one across the whole gap between columns.
- A table is a run of three or more nearby lines that each have at least two cells. The lines with the most cells define the column bands.
- Every cell goes into the column band it overlaps most. If at least 60% of the rows have two or more filled cells, the run counts as a table. When a page has several, the longest one is used.
- Columns that are empty in every row are dropped, and the rows are written as CSV with quotes where a cell contains a comma.
If no table is found, every line of the page is listed instead. A note reminds you to check merged headers and wrapped cells. Nothing is uploaded; pdf.js may download standard font or character-map data from cdn.jsdelivr.net when the PDF needs it.
Worked examples
A statement page with separate cells. On a test statement whose text layer holds every cell as its own piece, with Date, Description, Debit, Credit and Balance columns, the tool returns five columns. The row for 3 September reads 03/09 | Grocery store | 54.20 | | 1,145.80, with the empty Credit cell kept in place, and the header row comes first.
A page with space items between cells. On a 5-row test statement built with a PDF library, pdf.js reports a space item stretching from each cell to the next. The tool skips those, so the four columns come out separately: 03/09 | Grocery store | 54.20 | 1,145.80.
A wrong page number. Asking for page 5 of a 2-page file gives Page 5 is out of range — this PDF has 2 pages.
Limits and tips
- Cells that wrap onto two lines become two rows. Merge them by hand.
- Headers that span several columns may land in one column.
Frequently asked questions
Can it read tables from several pages at once?
Why are my column names Column 1, Column 2…?
What if every row lands in one column?
Does it work on scanned statements?
Are the numbers converted?
How do we know nothing is uploaded? Test it yourself on the privacy proof page.