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.
- No uploads
- Free
- No sign-up
Loading tool…
How to convert a PDF to JSON
1. Open the PDF
Choose a PDF from your device. Its text is read in your browser and the JSON appears straight away.
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. 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
- Works with digital PDFs. A scan has no text to export until you run OCR on it.
- Choose Lines with positions when a script needs to find values by where they sit on the page.
- Tables come out as lines of text, not as rows and columns.
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
- PDF toolPDF to textCopy all the text out of a PDF.
- PDF toolSearchable PDF OCRRead scans with free local OCR and download a searchable PDF plus extracted text.
- Spreadsheet toolExcel to JSONConvert Excel files to JSON.
- Spreadsheet toolCSV to JSONConvert CSV files to JSON.
- PDF toolPDF to WordDownload an editable DOCX from a text PDF or scanned document, with optional local OCR.
- PDF toolSplit PDF by textStart a new PDF before each page containing your phrase and download all parts as a ZIP.