Turn an invoice into JSON your code can parse.
Convert an invoice to JSON with stable snake_case keys and nested line items. Amounts stay as printed. Try the free preview first.
This preview shows the first 350 words and does not keep your file.
Need a different result? Turn anything into anything: drop any file, pick what you want out of it.Try it →Invoice layouts differ from supplier to supplier, so pulling fields out of a PDF with regular expressions breaks as soon as a template changes. This page turns one invoice into a single JSON object with fixed keys for supplier, customer, line items, tax and totals, so your parser reads every invoice the same way. The preview shows the structure; a free account returns the full object as a .json file.
What you get
Stable field names
Keys use snake_case and stay the same from one invoice to the next, so your code does not need a branch for each supplier's layout.
Nested groups
Supplier, customer, payment terms, each line item and the tax and total block sit in their own objects or arrays, matching how the invoice is organised.
Values as printed, null when missing
Invoice numbers, dates, amounts and tax are copied as printed, without rounding. A field the invoice does not show comes back as null, not as a guessed value.
How it works
- Step 1
Paste the invoice text or drop the PDF or Word file into the box.
- Step 2
Read the JSON in the preview and check that the keys match the structure you expect.
- Step 3
With a free account, get the complete JSON and a .json download, plus long and scanned files, batches, and your own field names or a schema.
Who uses it
Backend developers
Use the output as a fixture or a sample payload when you build an accounts payable import, so the parser is written against real invoice structure.
Developers writing tests
Turn sample invoices into JSON files to check edge cases such as missing tax lines, multiple pages or unusual payment terms.
Data engineers loading invoices
Convert a folder of supplier invoices into one structure per file, then load the JSON into your database or queue with predictable column mapping.
Questions
Will the field names be the same for every invoice?
The tool follows one fixed structure for invoices, with snake_case keys for supplier, customer, invoice number, dates, line items, tax and totals. If the invoice does not show a field, its key is still present and the value is null, so your parser does not have to check for missing keys.
Are amounts converted to numbers?
Amounts and tax are kept as printed. A total shown as £828.00 keeps its two decimal places and is not rounded. Decide in your code how to handle the currency symbol and the decimal separator, because some suppliers print commas instead of points.
Can I use my own key names or a schema?
Yes, with a free account you can ask for your own field names or give the structure your tool expects, such as a JSON schema. The preview always uses the default structure.
Does the preview keep my invoice?
The preview reads up to 5 pages of a PDF, 2 MB, or about 6,000 characters of text and does not keep the file. Scanned invoices need a free account because they are read with OCR.
Can I rely on the JSON without checking the invoice?
Results can contain mistakes, especially with poor scans or unusual layouts. Check the values against the original invoice before you post a payment or import the data into a live system.
Related tools
More tools for developers: see them all.
See it on real examples
Three actual runs of this tool. Open one to see the input and the whole result.