PDF to JSON
Extract a PDF's structure into a JSON file — document metadata, one entry per page, and the page's text rebuilt into lines with their positions. It is completely free, needs no sign-up and adds no watermark — and it runs in your browser, so your file is processed on your device and never uploaded.
PDF → JSONHow to use PDF to JSON
- Add your PDF — its text layer is read on your device, never uploaded anywhere.
- Tap Extract JSON. Pages, text lines and document metadata are collected.
- Download the .json file, ready for scripts, spreadsheets and other tools.
Good to know
- Price: free. There is no paid plan, no credits and no trial.
- Sign-up: none. The tool opens and works straight away.
- Watermark: none is added to anything you download.
- Privacy: Your files are processed on your own device, in your browser, and are never uploaded.
- Part of: the Convert tools in PdfLuxe — 151 free tools in one place.
How PDF to JSON works
This tool reads your PDF with PDF.js in your browser and walks it page by page, collecting what a program would want to know: the page count, each page's dimensions, its extracted text, and the document's metadata such as title and author when present. That information is assembled into a structured JSON document — pages as an array, text as strings, numbers as numbers — and downloaded as a .json file. Nothing is rendered and nothing is uploaded; it is a data extraction, not a visual conversion.
JSON is the interchange format of modern software, so the output drops straight into a script, a spreadsheet import, a database load or an AI pipeline. The text extraction follows the PDF's own text layer: a born-digital PDF yields clean, ordered text, while a scanned PDF has no text layer to extract — its pages appear with empty or minimal text until the file has been through OCR. Reading order follows the order text is stored in the file, which on multi-column pages may differ from visual reading order.
When to use PDF to JSON
- Feeding documents into software. Developers and analysts use the JSON as structured input for search indexing, data pipelines and automation.
- Auditing a document set. Page counts, sizes and metadata across many PDFs become data you can sort, filter and report on.
- Preparing text for AI tools. Extracted page text in JSON is a clean hand-off for summarisation, question-answering and classification workflows.
- Checking what a PDF really contains. The JSON shows the actual text layer — useful for diagnosing why a PDF will not search or copy properly.
- Archiving metadata. Keep a machine-readable record of a document's structure alongside the document itself.
Privacy — your files stay on your device
Your files are processed on your own device, in your browser, and are never uploaded. There is no account, no sign-up and no cloud copy of your document: the work happens in this tab, and the result exists only as the file you download. Extraction runs in this tab with PDF.js; your PDF and its text never leave your device.
Questions people ask
Is this really free?
Yes. Every tool in PdfLuxe is free with no premium tier: no sign-up, no credits that run out, and no watermark on what you download.
Are my files uploaded anywhere?
No. The conversion runs entirely in your browser, on your own device. The file you add is never uploaded to a server.
What exactly is in the JSON?
The document's metadata (title, author, creator and similar fields, when the PDF carries them), the page count, and for every page: its size in points, its rotation, its full text, and its text broken into lines — each line with its vertical position and its individual text items with x position, width, height and font name.
Why did some pages come back with no text?
This tool reads the PDF's text layer. A scanned page is a photograph of text and has no text layer, so its lines are empty — the result tells you how many pages had no text. Run the PDF through OCR PDF first to add a text layer, then extract again.
How are lines decided?
Text items that share the same baseline on the page are grouped into one line, in reading order, using the positions pdf.js reports. Multi-column pages can interleave columns within a line group — the per-item positions are included so your own code can re-sort if it needs to.
Is layout or formatting preserved?
Only as data: positions, sizes and font names are in the JSON, but colours, images and vector graphics are not extracted. For a visual copy of the pages, use PDF to JPG or PDF to PNG instead.
What can I use the JSON for?
Feeding a document into your own script or app, checking what text a PDF really contains, building an index or search, or handing structured text to another tool without copy-pasting from a viewer.
What exactly is inside the JSON file?
Document-level metadata (such as title, author and page count where the PDF provides it) and a per-page record with the page's size and its extracted text. The exact fields follow what the PDF itself contains — a file with no metadata set produces empty metadata fields, not invented ones.
For people who need the document as data
Most PDF tools answer 'what does this page look like?' PDF to JSON answers 'what does this document contain?' — in a form software can use directly. Developers use it to pipe PDF text into apps and pipelines; careful readers use it to see exactly what text a PDF holds, in order, with the metadata the file claims about itself. The extraction runs on your device with pdf.js — the same reader the preview uses — so the JSON reflects the document's real text layer, nothing guessed.
Structure of the output
The file is one JSON object: file and extractedAt say where it came from; metadata carries the document info dictionary; pages is an array with one object per page — page number, width and height in PDF points, rotation, the page's lines, and the page's text as one string. Each line lists its items separately, so nothing about the original positioning is lost.
Honest limits
This reads the text layer only: scanned or photographed pages contain no extractable text and come back empty (the result counts them for you) — OCR first if you need their words. Images, colours and vector drawings are not part of the output, and line grouping follows baselines, so complex multi-column layouts may need re-sorting in your own code using the item positions provided. Very large documents produce very large JSON files. And nothing is uploaded: the extraction happens in your browser.
- Scanned PDFs yield little or no text, because a scan is a picture with no text layer. Run OCR PDF first if you need the words from a scan.
- Layout is not preserved as layout: JSON carries text and structure, not fonts, columns or exact positions as a visual replica. Multi-column reading order follows the file's internal order.
- Very large PDFs produce very large JSON files, and extraction is bounded by your device's memory like every in-browser tool.
Related tools
Questions about this tool? Email support@pdfluxe.com.