PDF tool · runs in your browser

Convert a PDF to JSON

Turn the text of a PDF into structured JSON: every page with its text, its lines and, if you want, where each line sits on the page. Free, with no account, and the PDF stays on your device.

Loading tool…

How to convert a PDF to JSON

  1. 1. Open the PDF

    Choose a PDF from your device. Its text is read in your browser and the JSON appears straight away.

  2. 2. Choose how much detail

    Text gives one string per page. Lines adds each line as its own entry. Lines with positions adds x, y and font size for every line. Tick Minify for a smaller single-line file.

  3. 3. Copy or download

    Select Copy JSON to paste it into your code, or Download .json to save the complete file.

What is in the file

The top level holds the file name, page count and any document properties such as title and author. Each page has its number, its width and height in PDF points, and its text. Positions are measured from the top-left corner of the page; x is the left edge of a line and y is its baseline.

Tables, forms and scans

A PDF stores positioned text, not rows and columns, so tables arrive as lines of text. Use Lines with positions to group values into columns in your own script. Form field values and images are not exported. A scanned PDF has no text until you run OCR PDF on it. For plain text without structure, use PDF to text.

Built by Faheem Riaz at Feemag. How file privacy works · Report a problem

Good to know

Questions & answers

What does the JSON contain?

The file name, page count and document properties, then one object per page with its number, size in PDF points and text. Depending on the option you pick, each page also lists its lines, or its lines with x and y position and font size.

Does it turn tables into JSON rows?

No. A PDF stores positioned text, not table cells, so a table is exported as lines of text. Lines with positions gives you the coordinates to rebuild columns in your own code. For data that is already in a spreadsheet, use Excel to JSON or CSV to JSON instead.

Can I convert a scanned PDF to JSON?

Not directly, because a scan is a picture with no text in it. Run OCR PDF first to add a text layer, then convert the result here.

Is my PDF uploaded?

No. The PDF is read by pdf.js inside your browser and the JSON is built on your device.

Is it really free?

Yes. Every Feemag tool is free, with no sign-up, no watermarks added by us and no daily limits.

Are my files uploaded anywhere?

No. Your files are processed by your own browser on your device and never uploaded to a server. Processing speed depends on your device and file size.

Does it work on my phone?

Yes: in any modern browser (Chrome, Safari, Edge or Firefox) on iPhone, Android, Mac, Windows and Linux.

More free tools