PDF to JSON

Export page text, coordinates and dimensions as JSON.

PDF to JSON is a method that reads the text layer of a PDF and exports each page as structured JSON. The output includes the text along with coordinates and page dimensions, so software can locate each piece of text on the page. It works on existing text only, so scanned pages need OCR before export. Choose a file, process it, and download the JSON.

PDF to JSON at a glance

PDF to JSON reads the existing text layer of a PDF and writes page text, coordinates and page dimensions as JSON. It can export PDF text with positions for parsing by other programs. It does not run text recognition, so the main limitation is that scanned pages with no text layer need OCR first.

Method
Export page text, coordinates and dimensions as JSON.
Where it runs
In your browser; the values or files you use are not sent to a server.
ON YOUR DEVICE

PDF to JSON

pdfjs

Export page text, coordinates and dimensions as JSON.

Choose a file
or drag & drop here

Export page text, coordinates and dimensions as JSON. The operation runs in your browser. Your file is not uploaded for this task.

How it works

Export page text, coordinates and dimensions as JSON. Choose a supported file, review the operation options, process the document, and download the result. Uses the existing text layer. Scanned pages need OCR first.

  1. Choose the source document in a supported format.
  2. Review the options, processing location and any limitations shown beside the tool.
  3. Process the file and review the downloaded result while keeping the original.

How to export PDF text as JSON?

Use this when a program needs the words on a PDF along with their positions, rather than a plain text copy. The export keeps each page as its own block, so you can match text to a location on that page. Typical uses include feeding document content into a data pipeline, checking which words appear where, or building a search index. Select your file, run the process, and download the JSON for use in your own code.

What do the coordinates and dimensions mean?

Coordinates describe where each piece of text sits on its page, usually measured from a corner of the page. Dimensions give the width and height of the page, which lets you convert positions into relative values if you need them. Because the export reflects the stored text layer, the order of items in the JSON may not match the order you read them visually. Compare a few known words with the original page before relying on positions in production code.

What common mistakes or limits should I check?

The biggest limit is that the tool reads only the existing text layer. A scanned page usually contains an image of text rather than text itself, so it returns little or nothing until OCR has been applied. Another common mistake is building code on one sample without checking a few other pages first. Also check that you exported the right file, since a long export can be hard to review by eye.

Frequently asked questions

Where is my file processed?

On your device. This tool does not upload the document. Loading the app and its assets still makes normal website requests.

Does this modify my original file?

No. Download the processed copy and review it before replacing or sharing any original.

What limitations should I check?

Uses the existing text layer. Scanned pages need OCR first.

Can I extract text coordinates from PDF pages?

Yes, as long as the PDF has a text layer. The export lists each text item with its position and the size of its page. Scanned images without text will not produce usable content, so run OCR first if needed.

Is the output useful for building a search index?

It can be, because the text is paired with positions and page numbers. A search index usually needs the words and their page location, both of which the export provides. Check that the extracted words match the original spelling and spacing on a sample page.

Why is some text missing from the export?

Text missing from the export usually means the page is an image or the text is stored as outlines. Only the existing text layer is read, so nothing is recognized from pixels. Run OCR on the file, then export it again to see if the missing text appears.

Is PDF to JSON free and private?

Yes. It is free, needs no account and runs in your browser, so the files you select are not sent to a server.

Sources and assumptions

These tools send the file you choose to the document server when you press the action button. Read the privacy details before submitting anything confidential.

More in PDF Tools