PDF Text Extractor

Pull the text out of a PDF and get it back in the order a person would read it. That last part is where most extractors fall down: pdf.js hands back positioned fragments rather than lines, and simply concatenating them in array order produces output that looks fine on a simple page and turns into interleaved nonsense on anything with two columns. This tool reconstructs lines from the glyph positions instead — grouping fragments by their vertical coordinate, sorting top to bottom, then left to right — so the result matches what you see on the page. You can keep every line break or merge wrapped lines into paragraphs, extract a page range, and read the output per page or combined. If the PDF turns out to be scanned images with no text layer at all, it says so and points you at OCR rather than handing you an empty box. The file never leaves your browser.

What extracts well, and what does not

ContentResult
Digital text PDFsAccurate, in reading order
Two-column layoutsCorrect order, columns read in sequence
Scanned pagesNo text — needs OCR, and you are told so
TablesRows in order, column structure lost
Headers and footersIncluded, as part of the page
Non-Latin scriptsFine where Unicode mappings are embedded

When to use it

  1. Copy text out of a PDF that has copying disabled in the viewer.
  2. Get a plain-text version of a report for search or analysis.
  3. Pull quotes out of a paper without retyping them.
  4. Check whether a PDF has a real text layer or is just scans.
  5. Extract text from several PDFs in one pass.

How to Use

  1. Drop in one or more PDFs.
  2. Choose whether to keep line breaks or merge into paragraphs.
  3. Optionally limit to a page range.
  4. Read the text per page or combined, then copy or download it.

Features

  1. Reading order reconstructed from glyph positions, not array order
  2. Per-page and combined output
  3. Keep line breaks, or merge wrapped lines into paragraphs
  4. Page ranges including lists and reversed ranges
  5. Detects scanned PDFs and points at OCR instead of returning nothing
  6. Word, character and line counts
  7. Multiple PDFs with a combined download
  8. 100% client-side — sensitive documents stay private

FAQs

Why does text from other tools come out jumbled?

Because they concatenate pdf.js text fragments in array order. A PDF stores positioned glyphs, not lines — array order has no guaranteed relationship to reading order, so a two-column layout interleaves. This tool groups fragments by their y coordinate and sorts by position, which reconstructs the order you actually read in.

It found no text. What now?

The PDF is almost certainly scanned images rather than digital text — very common for anything that went through a scanner or a fax. There is no text layer to extract, so you need OCR, which recognises characters from the picture. The tool tells you when it detects this rather than returning a blank result.

What does merging lines into paragraphs do?

Joins wrapped lines back into continuous paragraphs, treating a line that does not end in sentence punctuation as continuing. Useful when you want flowing prose; leave it off when line breaks are meaningful, as in poetry, code, addresses or tables.

Will tables come out correctly?

Rows will be in the right order, but column structure is lost — a table becomes lines of text. PDFs do not store tables as tables, only as positioned glyphs, so reconstructing columns reliably is a much harder problem. For tabular data, a PDF-to-spreadsheet tool is the better fit.

Does it work with other languages and scripts?

Yes, wherever the PDF embeds proper Unicode mappings. Right-to-left scripts and complex scripts generally extract correctly. Some older PDFs use custom font encodings with no Unicode mapping at all, and those produce garbled characters no extractor can fix.

Is my PDF uploaded?

No. It is parsed in your browser. Contracts, medical records and financial statements — the documents people most often need text out of — never leave your device.

Technical Details

pdf.js returns a page's text as positioned fragments, not as lines — a single visual line is usually several items, and consecutive items in the array frequently belong to different lines or even different columns. Concatenating the str values in array order is what most extractors do and it is why their output on a two-column paper reads as interleaved nonsense. Here each fragment's transform matrix is used instead: items whose y coordinate falls within two points of each other are grouped into one line, lines are sorted by descending y because PDF user space grows upward rather than downward, and fragments within a line are sorted by x. That reconstructs reading order from geometry rather than trusting array order. An optional merge pass joins wrapped lines into paragraphs by treating any line that does not end in sentence punctuation as continuing into the next. Pages that yield no fragments at all are counted, and when most of a document is empty the tool says the file is scanned and points at OCR instead of handing back a blank box. Everything runs in the page; the PDF is never uploaded.

From the Blog

  • PDF to Word Online — Free, Fast & Private

PDF Tools

PDF Tools

  • PDF OCR
  • PDF to Word
  • PDF Merge
  • PDF Split
  • PDF Compressor
  • Bates Numbering for PDF
  • Document Scanner
  • PDF Redaction Tool (True Removal)