Convert PDF to JSON
Convert PDF to JSON with source metadata, text by page and separate table data.
Convert PDF to JSON when code will read the document: a search indexer, database import, or another service. The file keeps text by page and any detected tables as separate data.
JSON structure
The result always has four top-level fields: source information, conversion time, text pages and tables.
{
"source": { "filename": "report.pdf", "format": "pdf", "pages": 2, "size_bytes": 384416 },
"converted_at": "2026-09-17 10:30:00",
"pages": [{ "number": 1, "text": "Page text", "lines": ["Page text"] }],
"tables": [{ "page": 1, "header": ["Number", "Amount"], "rows": [["1", "500"]] }]
}
sourcecontains the original file name, format, size, and number of pages with extracted text.pageskeeps the number, full text, and lines of every page.tablesstays separate from text: every table has its page number, header, and rows. It is an empty array if no tables were found.
Text from a scanned PDF is included after recognition. Check recognised values before importing a poor scan.
How to convert
- Upload a PDF.
- Select JSON as the target format.
- Download the finished file and pass it to your code.
If you only need tables, use the PDF to CSV converter; for plain text without structure, use PDF to TXT.
More about the formats
What the format is, how to open it and how it differs from the others.