PDF Text Extractor
Pull the plain text out of a PDF straight in your browser — read the document's embedded text layer, no upload, no OCR.
229 views
Processing…
Could not read the PDF — it may be corrupted or password-protected.
No text found — this PDF may be a scanned image with no embedded text layer (OCR is not performed by this tool).
What a PDF's Text Layer Actually Is
A PDF is not a picture of a page — at least, not usually. When a PDF is produced from a word processor, a web page, or typeset software, the page content is stored as a sequence of drawing instructions: "place glyph G at position (x, y) using font F at size S," repeated for every character on the page. Each of those glyph-placement instructions carries a reference back to a font's character-encoding table, which is how software can map the drawn shape back to an actual Unicode character rather than just a picture of one. This tool works by loading the PDF with Mozilla's open-source pdf.js library and calling its getTextContent() API on every page — critically, this reads that instruction stream directly, without ever rendering the page to pixels, so it works even on a device with no graphics acceleration and runs almost instantly compared to rendering.
This is fundamentally different from a scanned PDF, which is what you get when a paper document is photographed or run through a scanner and saved as PDF — in that case the "page" is just a full-page JPEG or TIFF image with no glyph instructions behind it at all, because no software ever knew what the text said; it only captured pixels. Calling getTextContent() on a scanned page returns nothing, or close to nothing, because there is no text layer to read — the information genuinely is not there in the file, in the same way you cannot select text on a scanned page in a normal PDF viewer. Recovering text from a scanned document requires a completely different technique, OCR (optical character recognition), which analyzes the pixel shapes and guesses at characters; that is a fundamentally different, much more error-prone process this tool does not perform. If your PDF is a scan, look for a dedicated image-to-text (OCR) tool instead — one is planned separately on this site.
Why Extracted Text Can Come Out of Order
A subtler problem affects even PDFs that do have a real text layer: getTextContent() returns glyph-placement items in whatever order they were originally drawn when the PDF was generated — not necessarily the order a human would read them in. Most simple, single-column documents are drawn top-to-bottom, left-to-right, matching natural reading order, so extraction looks correct. But a PDF exporter is free to draw content in any sequence it chooses, and many do not preserve visual order: a two-column academic paper, a magazine layout, a table, or a PDF with text boxes and callouts can easily have its drawing order interleaved or completely reversed relative to how a reader's eye would move across the page, because the specification defines position, not reading sequence. This tool concatenates each page's items in the order pdf.js reports them and separates pages with a clear --- Page N --- marker so you can see exactly which page each block came from and manually reorder a multi-column result if needed.
- Nothing is uploaded: the PDF is parsed entirely client-side using pdf.js running in your browser; the file never reaches this site's server.
- Password-protected PDFs will fail to open — this tool does not attempt to bypass PDF encryption or permissions.
- Extracted spacing may differ from the visual layout — tables in particular often extract as a flat sequence of cell values rather than a formatted grid, since PDF has no native concept of a "table" the way HTML does.
- Multi-page documents get page markers so you can tell where one page's content ends and the next begins, since PDF pages are otherwise independent content streams with no inherent paragraph break between them.
Frequently Asked Questions
Why did I get an empty or nearly empty result?
Your PDF is very likely a scanned image — a photograph or scan of a paper page saved as PDF with no embedded text, just a picture. This tool reads the PDF's text layer directly and does not perform OCR (optical character recognition), so a scanned page with no text layer returns nothing to read.
Why is the extracted text out of order in a two-column PDF?
PDF stores content as drawing instructions in whatever sequence the exporting software chose, which is not guaranteed to match visual reading order. A two-column layout, table, or magazine-style page can interleave text from both columns because the file format defines glyph positions, not a reading sequence.
Does this tool perform OCR on scanned documents?
No. This tool only reads a PDF's existing embedded text layer via pdf.js's getTextContent() API — it does not analyze pixels or recognize characters in an image. For scanned documents with no text layer, an image-to-text (OCR) tool is a separate, different technology.
Is my PDF uploaded to a server?
No — the entire extraction happens in your browser using the open-source pdf.js library. The file is read locally via the File API and never transmitted anywhere.
Why does the output have "--- Page N ---" markers?
Each PDF page is a separate content stream with its own text items and no inherent connection to the next page. The page markers make it clear where one page's extracted text ends and the next begins, which matters for documents where paragraphs or sentences continue across a page break.
Similar Tools
Report a Problem
PDF Text Extractor
Comments
No comments yet — be the first to write one!