Extract data from PDFs and invoices to JSON
Choose the fields you need, run it on one PDF or a whole batch, and check each value against the quote and page it came from before exporting.
Drop a PDF hereLet go to start
or paste with Ctrl/⌘+V
Try it 5× without an account. A free account includes 20 AI credits a month. See plans
What it does
PDF to JSON, explained
To extract data from a PDF such as an invoice into JSON, upload it, pick the fields you want (or the Invoice preset) and run the extraction: the AI reads the text and returns each field with the page number and an exact quote it came from, and PDFBetter checks every quote against the page. Fields that aren't in the document stay empty instead of being guessed. It costs 1 AI credit per page read.
Read more
You define the fields — text, number, amount, date, yes/no, one of a list, or a table of line items — or start from the Invoice, Receipt, Bank statement summary or Contract key terms preset. If a quote isn't on the cited page, or doesn't contain the value, the value is marked unverified so you know to look. Numbers and dates are normalized (1.234,56 and 1,234.56 both become 1234.56; “5 Mart 2026” and 05.03.2026 become 2026-03-05) and checked against the field's type, options and pattern. The output is JSON for developers and integrations, or CSV and Excel (XLSX) for spreadsheets and accounting imports.
Use it for one document here, or for a whole folder of invoices in the Extractions dashboard: run a batch, review the results in a table, correct cells, approve or reject each document, and export JSON, CSV or Excel. Corrections are used in the export. The Free plan includes 20 AI credits a month and Pro includes 500. To run the same steps on every new invoice automatically — OCR, extraction, a person's approval, then a CSV — save them as a workflow; AI agents such as Claude or Cursor can also run extractions through PDFBetter's MCP server.
The page text is sent to OpenAI's API under OpenAI's API data-usage terms, which by default exclude API data from model training. For tables you just want copied as they appear, PDF to Excel or PDF to CSV may be simpler and don't use AI.
At a glance
What you get back
| Field | Value · quote | Page |
|---|---|---|
| supplier | Harbor & Pine Studio“Harbor & Pine Studio” | p. 1 |
| invoice_number | 2026-014“Invoice no. 2026-014” | p. 1 |
| invoice_date | 2026-10-03“Invoice date 10/03/2026” | p. 1 |
| due_date | 2026-11-02“Due 11/02/2026” | p. 1 |
| total | 4028.00“Balance due $4,028.00” | p. 2 |
ExportJSONCSVXLSX
How to do it
Extract data from PDFs and invoices to JSON in 5 steps
1Your PDF
2Pick the fields
3Rows with page evidence
- 1
Upload a PDF
Digital PDFs work directly. Scanned PDFs need OCR first so there is text to read.
- 2
Pick the fields
Start from a preset such as Invoice, or add your own fields with a type, a short description and, for lists, the allowed options.
- 3
Extract
Sign in with a free account to run it. It uses 1 AI credit per page read.
- 4
Check the evidence
Each value shows its status, page and quote. Look closely at anything marked unverified, missing or invalid.
- 5
Download or scale up
Download the JSON, or open the Extractions dashboard to run the same fields over many PDFs and export CSV or Excel.
Example
Before and after
A two-page supplier invoice: totals on page 2, the invoice number and date on page 1, five line items in a table.
JSON with invoice_number, invoice_date as 2026-03-05, total as 1234.56 with currency EUR, and five line_items rows, each value carrying its page and the quoted text it was read from.
Settings & formats
What you can control
- Presets
- Invoice, Receipt, Bank statement summary and Contract key terms, as starting points you can edit.
- Field types
- Text, number, amount (with currency code), date (YYYY-MM-DD), yes/no, one of a list, and tables with typed columns.
- Required and pattern
- Mark fields you expect in every document and give a regular expression a value must match, such as INV-\d{4}.
- Exports
- JSON with pages and quotes per value; CSV or Excel with one row per document and line items on a separate sheet.
Input
Output
Good to know before you start
- The AI can still pick the wrong value when a document has several similar ones (for example subtotal and total); the quote shows which text it used, and descriptions on your fields help.
- Scanned PDFs without a text layer can't be read until OCR adds one, and text inside images, stamps or handwriting is not read.
- Only the first 10 pages are read per document on Free and 50 on Pro; pages beyond that are listed as not read.
- Dates written like 03/05/2026 are ambiguous. If the document doesn't show which order it uses, the date is read day-first and marked unverified for you to check.
- It extracts what is printed; it doesn't check whether an invoice is correct, add up totals or validate tax numbers.
If something goes wrong
If something goes wrong
- It says the document has no readable text
- The PDF is a scan. Run OCR PDF first, then extract again from the OCR'd version.
- A value is marked unverified
- The quote the AI gave wasn't found on the page, or didn't contain the value. Open the page, check the value, and correct it in the review table if needed.
- A field keeps coming back missing
- Check that the document really contains it, then add a description to the field with the label used in your documents, such as “Amount payable”.
PDF to JSON: questions people ask
How do I know a value is right?
Each value shows the page and a quote copied from it, and PDFBetter checks that quote against the page text. “Found” means the quote is on that page and contains the value; anything else is flagged for you to check.
What happens when a field isn't in the document?
It is marked missing and left empty. The AI is instructed never to guess, and values without supporting text are flagged rather than filled in.
Can I process many invoices at once?
Yes, in the Extractions dashboard. A batch can include up to 30 documents on Free and 100 on Pro. Documents run in the background, a failure on one doesn't stop the others, and you review the results in one table.
How many credits does it use?
1 AI credit per page whose text is read. Pages with no text layer and pages beyond your plan's limit aren't charged. The Free plan includes 20 AI credits a month.
Can I correct values before exporting?
Yes. Click a cell to see its evidence, type the correct value, and approve or reject each document. Exports use your corrections and leave out rejected documents.
How is this different from PDF to Excel?
PDF to Excel copies tables as they appear on the page, without AI. PDF to JSON reads the whole document and fills the specific fields you asked for — invoice number, due date, total — in a fixed shape every time, with a page quote for each value.
Can an AI agent run this for me?
Yes. Agents connected through PDFBetter's MCP server, such as Claude or Cursor, can list schemas, extract a document, run batches, review and export, with the same credits and evidence.
Is my document used to train AI?
The text is processed by OpenAI's API under OpenAI's API data-usage terms, which by default exclude API data from training. PDFBetter does not train models on your documents.