invoice to CSV

Convert invoice PDF to CSV

CSV is the duct tape of finance: every ERP, bookkeeping app and script can read it. doc2json turns an invoice PDF or scan into a CSV with one row per line item and the invoice number, vendor and totals repeated on each row, so it imports cleanly and pivots nicely.

Made-up example

What the CSV file looks like

Example only. This uses a trimmed copy of the invoice template, saved as invoice-lite, to show how the CSV follows your schema. Invented companies and numbers.

Schema used
{
  "type": "object",
  "properties": {
    "invoice_number": {
      "type": "string"
    },
    "invoice_date": {
      "type": "date"
    },
    "vendor_name": {
      "type": "string"
    },
    "currency": {
      "type": "string"
    },
    "total": {
      "type": "number"
    },
    "line_items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string"
          },
          "quantity": {
            "type": "number"
          },
          "unit_price": {
            "type": "number"
          },
          "amount": {
            "type": "number"
          }
        }
      }
    }
  }
}
Output: CSV (.csv)
inv-1042-2026-10-30.csv
Rowinvoice_numberinvoice_datevendor_namecurrencytotalline_items.descriptionline_items.quantityline_items.unit_priceline_items.amount
2INV-10422026-10-25Northwind Supply LtdUSD1280.5Cat6 cable, 50 m4120480
3INV-10422026-10-25Northwind Supply LtdUSD1280.5Network switch, 24 port2350700

With the full invoice template you get all 25 columns. With your own schema you get exactly the ones you asked for.

How it works

Three steps, no setup.

  1. Step 1

    Pick your columns

    Use the built-in invoice template, or trim it to just what your import needs, like the example below.

  2. Step 2

    Upload the invoice

    PDF, PNG or JPEG. doc2json reads it and fills every field it finds.

  3. Step 3

    Download CSV

    One row per line item, UTF-8 with a byte order mark, and safe to open in a spreadsheet.

API

Get the CSV from the API

Add export=csv to the parse. The CSV comes back base64 encoded next to the JSON, at no extra credit cost.

schema can be a saved name like invoice or invoice-lite, or the schema itself as JSON.

Read the API docs
POST /api/v1/parse
curl -X POST https://doc2json.manoonlabs.com/api/v1/parse \
  -H "Authorization: Bearer $DOC2JSON_KEY" \
  -F file=@INV-1042.pdf \
  -F schema=invoice-lite \
  -F export=csv \
  | jq -r '.export.content' | base64 -d > inv-1042-2026-10-30.csv

Why doc2json

Why doc2json and not a generic PDF to CSV converter

  • Your columns, your names

    Generic tools guess columns from the page layout, so every supplier gives you a different CSV. Here the schema decides, so every invoice lands in the same columns.

  • Line items, not lines of text

    A description that wraps over two lines is still one row. Subtotals and footers don't sneak in as fake items.

  • Import-ready

    Comma separated, quoted where needed, UTF-8 with a byte order mark, and guarded against formula injection, so it is safe to hand to a colleague or an import job.

FAQ

Invoice to CSV, answered.

Can I choose which columns end up in the CSV?

Yes. The CSV columns come straight from the schema. Copy the invoice template, delete what you don't need, rename the rest to match your importer, and parse with that.

Why are invoice fields repeated on every line item row?

So each row is complete on its own, which is what most importers and pivot tables expect. Two line items means two rows, both carrying INV-1042.

What happens with an invoice that has no line items?

You get a single row with the invoice fields. Nothing breaks, and the line item columns are just empty.

Do you store the invoices or the CSV?

No. The invoice is processed in memory for the request and then dropped. Neither the file nor the extracted data is saved, only a usage record with the time, page count and credits used.

Is invoice to CSV conversion free?

Yes, up to 50 pages a month on the free plan, one credit per page. CSV and Excel exports don't use extra credits. Try the Playground without signing up.

Related

Every invoice, same columns.

Build your CSV layout once, then just upload. 50 free pages a month.