Skip to the tool
CALCPARK

PDF to Excel

Extract tables from a PDF into an editable grid and download them as Excel (.xlsx, one sheet per page) or CSV. Scanned pages are read with OCR. Runs in your browser.

Files stay on your device
Loading the tool…

How to use it

  1. Drop the PDF and, if needed, limit the pages (for example 3-5 for the pages with the tables).
  2. Leave the method on Automatic: text pages are read directly and only scanned pages go through OCR. Press “Extract tables”.
  3. Check each page tab. Correct cells inline; remove rows or columns that should not be there with the × buttons.
  4. Download as Excel (.xlsx) or CSV. Both are generated from the edited grid.

Example

An invoice PDF with a 5-row, 4-column item table (Item, Qty, Unit price, Total) at 10 pt: the four header words start at x = 56, 300, 380 and 470 pt, so four column clusters are found (tolerance 2.5 × the median character width ≈ 12.5 pt). The totals “1,250.00” and “75.00” are right-aligned and start 20 pt apart, but the longer value reaches past the start of the shorter one, so they are merged into one column instead of two. The sheet “Page 1” gets 6 rows (header + 5 items); the Total column holds numbers, not text.

How tables are reconstructed

pdf.jssupplies each text run with its left edge, baseline, width and font size (y is flipped to top-down). Fragments whose vertical centres lie within 0.6 × the median height of each other form a row; within a row, fragments closer than the column tolerance are joined (OCR gives one fragment per word). Left edges are clustered into column starts with the same tolerance; a cluster is merged into its left neighbour when most of that neighbour’s fragments extend past the cluster’s start (ragged right-aligned numbers). Every fragment is assigned to the nearest column start, empty rows and columns are dropped. For scanned pages the same function runs on tesseract.js word boxes (recognize(canvas, {}, { blocks: true }), LSTM engine, language eng).

Limits

  • Cells that wrap onto two lines become two rows; merged header cells are placed in the first column they cover.
  • Tables drawn with borders but no gaps between columns, and tables rotated 90°, are not recognised.
  • OCR recognises English text; accuracy drops on faint or skewed scans and on handwriting. Always check OCR numbers.
  • Non-table text on the page is included as rows; delete them in the grid before downloading.

Sources: tesseract.js – documentation, ExcelJS – workbook API, RFC 4180 – Common format for CSV files.

Questions

Why do numbers land in the wrong column?
Right-aligned numbers start at different x positions. The tool merges such ragged clusters when the longer values reach past the shorter ones; if a column still splits, delete the extra column in the grid or widen your page selection so more rows inform the clustering.
Does OCR send my document anywhere?
No. Only the tesseract.js engine and its English language model are downloaded (from the jsdelivr CDN, about 4 MB, cached afterwards). Recognition runs in a web worker on your device.
Can I get all pages in one sheet?
Download the CSV: it contains every page in one file, separated by an empty line. The Excel file keeps one sheet per page so you can see where each table came from.