ToolZoneX
Blog

PDF to LlamaIndex JSON

Convert a PDF's per-page text into a JSON array matching LlamaIndex's Document format. Free, private, runs entirely in your browser.

Click to select a PDF file, or drag and drop

Your file never leaves your browser

How to Convert a PDF to LlamaIndex JSON

  • Upload the PDF you want to convert.
  • Click Convert to LlamaIndex JSON — text is extracted from every page and formatted as a JSON array of document objects.
  • Copy the JSON or download it as a .json file, ready to feed into a LlamaIndex ingestion pipeline.

Example

A 2-page PDF produces: [{"text": "...page 1 text...", "metadata": {"page_number": 1, "source": "report.pdf"}}, {"text": "...page 2 text...", "metadata": {"page_number": 2, "source": "report.pdf"}}] — one document object per page, matching LlamaIndex's simple Document schema.

Common Use Cases

  • Preparing a PDF for ingestion into a LlamaIndex RAG (retrieval-augmented generation) pipeline.
  • Getting per-page text with metadata for building a searchable document index.
  • Converting a document into a structured format for downstream LLM or embedding workflows.

FAQ

  • Why does one document's text come out empty? Scanned or photographed pages have no underlying text layer, so there is nothing to extract from that page — the JSON entry is still created, just with empty text.
  • Does this exactly match LlamaIndex's internal Document class? It matches the common simple JSON shape (text + metadata) used when loading documents manually — you can load this JSON and construct Document objects from it in your own ingestion code.
  • Is my file uploaded anywhere? No — extraction happens entirely in your browser; the PDF is never sent to a server.