Skip to content
PurePDF HQ
Color theme

PDF to JSON

Prepare a PDF for AI prompts, embeddings and RAG pipelines in your browser: metadata, per-page blocks (headings, paragraphs, lists, tables) and sized chunks with token estimates.

AI chunk size

Runs PDF.js in your browser, a 438.3 KB download the first time you convert. Open-source licenses

How to convert a PDF to JSON for AI

Drop a PDF onto the box above or choose one from your device, then pick a target chunk size (500, 1,000 or 2,000 characters) for your embedding model or context window.

Select Convert to JSON. Your browser reads the document in a Web Worker and saves a UTF-8 .json file with document metadata, structured page blocks and ready-to-index chunks.

What is inside the JSON output

The root object carries title, author, pageCount, pages and chunks. Each entry in pages gives pageNumber, width, height, text and an array of semantic blocks (headings with level 1–3, paragraphs, ordered or unordered lists, and tables with headers and rows).

Each entry in chunks keeps id, pageNumber, sectionHeading, text, charCount and tokenEstimate so every passage retains its source page and heading for citations.

Keep sensitive documents off third-party parsers

Cloud document-parsing APIs require sending the whole PDF before you can inspect or filter it. Because this tool runs PDF.js locally in your browser, you can turn contracts, reports or manuals into clean JSON on your own machine before sending only the chunks you choose to an embedding or LLM endpoint.