pdftojson.dev
Invoice → JSON

Turn an invoice PDF into JSON.

Get an invoice's contents as JSON your code can read — text in the browser for free, or structured fields and line items through the API.

— no file —
Runs in your browser Nothing uploaded Scanned & tables via API Free to use

Building something? Same parse, one call.

Send a PDF, get the same structured output back, plus OCR for scanned files and table extraction. Batch-ready. From $29/month.

Read the API docs →
# POST a file, get JSON curl -X POST https://api.pdftojson.dev/v1/extract \ -H "Authorization: Bearer $KEY" \ -F file=@doc.pdf \ -F format=json

Invoices are built to be looked at, not parsed. This tool reads an invoice's text layer and hands it back as JSON — pages, paragraphs, or word positions — so you can pull it into a script without wiring up a PDF library. It runs in your browser; nothing is uploaded.

When you need the actual fields — vendor, invoice number, dates, totals, and line items as an array — that's structured extraction, and it runs on the API. Send the invoice to the extraction endpoint and get back typed JSON you can push into your accounting system or database.

What's the difference between the free tool and the API for invoices?+

The browser tool extracts the invoice's text as JSON. The API does structured extraction — it reads named fields like vendor, dates and totals, and returns line items as an array.

Can it read scanned invoices or photos?+

Scans and photos have no text layer, so they need OCR. The browser tool handles text-based PDF invoices; the API can process scans and images.

Which fields can be extracted from an invoice?+

Common ones are vendor or supplier, invoice number, issue and due dates, currency, subtotal, tax, total, and line items with description, quantity and amount.

How accurate is invoice data extraction?+

Clean, text-based invoices with a conventional layout extract reliably. Unusual layouts, poor scans and dense tables are harder and are worth spot-checking before you rely on them.

Can I automate invoice processing?+

Yes — the API is built for it. Send invoices as they arrive and store or forward the JSON. See the API docs.

How do I convert an invoice to JSON in Python or Node?+

Upload the PDF to the extraction API as multipart form data. Python and Node examples are in the docs.

Can I extract line items as an array?+

Yes, through the API's structured extraction. Line items come back as an array of objects you can iterate over.

Is my invoice uploaded?+

Not for the free browser extraction of text-based PDFs — it stays on your device. Structured extraction and OCR run on the API, which needs the file.