How to extract PDF text into a JSON file
Choose a text-based PDF and convert it
Open the PDF in a viewer and try selecting a sentence with the cursor. If you can select actual words, choose that file in the tool above and select Convert to JSON. Wait while the browser reads each page; longer documents take more time. When processing finishes, inspect the preview and download the .json file. The tool handles one document per run, accepts an input up to 15 MB, and stops at 200 pages. The FilePiko home page lists other local file tools if your source is not a PDF.
A scanned page can look identical to a digitally created page on screen, so the selection check matters more than appearance. If dragging over a paragraph highlights only a rectangular image, there may be no text layer to extract. Run OCR in a separate tool first if you need machine-readable words from that scan. This page does not perform OCR, recognize handwriting, or infer information from diagrams.
Check page numbers and the saved file
The downloaded JSON contains one object with a pages array. Each array item has a page number and a text string. Page numbering starts at 1 and follows the document's page order. A short two-page document therefore produces two page records even if one page has no selectable text. Empty text is useful evidence that a page did not yield text, not proof that the page was blank.
For a long PDF, the on-page preview shows only the first part of the result. Open the downloaded file in a JSON editor and verify the final page record before using it in a script. The output also has a 15 MB size cap; dense text or a very large page count can hit that cap even when the original PDF is smaller. Keep the source PDF because the JSON does not preserve its visual layout.
Why PDF text does not behave like spreadsheet rows
PDF pages describe visual placement, not a universal reading order
PDF content is arranged for display on a page. Text can be drawn in fragments, placed in columns, rotated, or layered over other objects. The extractor joins text items in the order returned by the PDF text engine. It inserts a line break when that engine marks an end of line; otherwise it separates items with spaces. This is a practical text export, not a guarantee that every sentence follows the exact order you see while reading.
A two-column paper may interleave passages, and a header or footer can appear near body text in the output. Test a representative page before feeding all pages into search, summarization, or another downstream task. If exact paragraphs matter, inspect the JSON and apply your own document-specific cleanup. The PDF.js API documentation describes the text items exposed by the rendering engine.
Tables, form fields, and images need separate handling
A table may yield visible cell text, but the output is a page-wide string, not structured rows and columns. A line such as Product 12 14.00 does not tell JSON which word was a label, quantity, or price. Form fields and annotations may not appear in the text output as you expect. A chart's labels may be present while its graphical meaning is absent. Inspect source and result together before treating this JSON as a faithful data extraction.
If your real source is a CSV table, use csv to json instead; it makes records from column headers. If you have an XML data feed, xml to json preserves a nested data structure that a PDF text extractor cannot recover. Choosing the original structured source saves manual reconstruction of a table after it has been flattened into page text.
What the PDF-to-JSON conversion keeps and leaves behind
Page boundaries survive; fonts and coordinates do not
The JSON keeps page boundaries through the pages array and a page property on each record. It keeps extracted text as a string. It does not include font names, font sizes, coordinates, images, links, page thumbnails, or a copy of the source PDF. This makes it suitable for page-based text review, quick indexing, or selecting passages for later processing. It is not a complete PDF object model or an accessible replacement for the original document.
For example, a contract with a clause on page 12 can be searched by finding that page's text field. But bold emphasis, handwritten initials, and a signature image will not be represented as structured JSON fields. If the meaning depends on those visual features, keep the original PDF in the workflow and inspect it directly. Do not discard the source simply because the export succeeded.
Text quality depends on the source's text layer
Some PDFs contain selectable letters but have faulty character mappings. Their extracted strings may show missing spaces, replacement symbols, or text in a strange order. The tool cannot reconstruct the intended words from a broken embedded font map. Compare a few distinctive names and numbers against the source. For documents from a scanner, OCR can create a text layer, but its errors remain in the extracted JSON and need review.
A PDF can also contain pages that mix selectable text and scanned images. In that case the JSON may include the caption but omit words printed inside the image. Check several pages, especially appendices and scanned inserts, rather than judging the whole file by its first page. A page record with a short text value does not confirm that all visible content was captured.
Turning extracted page text into useful records
Read the pages array before connecting another tool
The JSON output has a root object containing pages. Each page record contains page and text; it is not directly an array of invoice lines, customers, or product records. If you want a spreadsheet of one row per page, first extract and choose your own columns, such as page number, document ID, and the passage you need. Do not assume that names or dates can be identified reliably merely because text extraction completed.
The json to csv converter expects an array of records, so you would need to select or reshape the pages array before using it there. The json to excel tool likewise makes sense after you decide on a tabular schema. Preserving page numbers at this stage helps you trace any later row back to its visual source for correction.
Use page references to verify downstream answers
Suppose you need to search 80 pages of manuals for a part number. The JSON gives each page a text value, which you can search locally in a code editor. When you find a match, open that page in the original PDF to check surrounding diagrams, footnotes, and revision notes. This verification matters because a text hit alone can omit context or confuse visually adjacent fragments.
For a report containing personal or confidential material, local processing avoids sending the source file to a conversion service. You still control what happens after you download the JSON. Save it only where you intend, and remember that text can be easier to search and copy than the original PDF. The browser's temporary preview disappears if you close or reload the page.
What to do when a PDF fails or produces empty text
Separate scanned pages from protected or damaged files
If conversion completes but every page has an empty text field, the PDF likely has no usable text layer. Test selection in a viewer, then use OCR outside this tool if the document is a scan. If the file does not open at all, verify it locally in another PDF viewer. A password-protected or malformed document can fail before the extractor reaches any pages. Download a clean copy or remove restrictions through an authorized source before retrying.
The tool enforces a 200-page maximum and 15 MB input limit. Splitting a long document into meaningful parts can help when you are authorized to do so, but remember that page numbers in each part will restart at 1. Keep a record of the source page ranges when joining results later. Reducing file size may help with bytes, but it will not create a missing text layer.
Investigate scrambled text in the original page
If one page produces gibberish while another is clear, inspect the PDF's fonts and whether text can be copied into a plain text editor correctly. A bad character map can affect both copying and automated extraction. If the copied text is already wrong, try getting a fresh export from the system that made the PDF. OCR may sometimes provide a separate route, but review its output against the visual original.
If only some lines seem out of order, the issue may be layout rather than corrupted characters. Multi-column pages, positioned labels, and repeated headers need cleanup tailored to that document type. This converter intentionally produces page text rather than guessing a universal table or reading order. Use the original PDF as the reference for any automated interpretation.