To extract text from a PDF, open the file below and download — the tool reads the PDF's text layer with pdf.js entirely in your browser and hands you clean text. A 3-page quarterly report becomes: heading ## Quarterly Report, body The quick brown fox jumps over the lazy dog near the riverbank., closing 2026 results were strong. — 18 words, paragraph breaks kept, hyphenated line-ends rejoined. Pick pages (1-3, 5, odd, even) and export .txt or .md. One catch: scanned PDFs have no text layer, so they need OCR first.

Extract

Open a PDF to begin. The file never leaves your browser.
Advertisement

What You Get From Each Kind of PDF

PDF typeText layer?Extraction result
Exported from Word, LaTeX, InDesignYes, real textClean text, correct reading order, headings detectable by font size
"Print to PDF" from a browser or appYes, real textClean text; occasional odd line breaks in multi-column layouts
Scanned, then OCR'dText overlay on imageMostly right; stray characters where the OCR guessed
Plain scan / photo PDFNo — image onlyEmpty output; needs OCR before extraction can work
Password-protectedEncryptedRefused until you unlock the file with its password

How the Extraction Works

Every PDF that isn't a raw scan stores its visible words as text objects: strings plus placement matrices. pdf.js walks those objects page by page and hands the tool each fragment with its x/y position and font size. The pipeline then rebuilds reading order: fragments on the same baseline join into a line (sorted left to right), lines group into paragraphs using the file's own spacing — a gap noticeably larger than the page's typical line spacing starts a new paragraph — and, in Markdown mode, lines set in type at least 15% larger than the body become headings.

Page specs

The pages box accepts all, odd, even, single pages like 7, and ranges like 1-3, mixed freely: 1-3, 5, 9-7 extracts pages 1, 2, 3, 5, 7, 8, 9 (reversed ranges flip automatically). Out-of-range numbers are rejected with the page count, so typos don't silently drop content.

A worked example

Take a one-page report with a 22pt title "Quarterly Report", two body lines at 12pt set 18 points apart ("The quick brown fox jumps over" / "the lazy dog near the riverbank."), and a closing line 36 points below the second. The pipeline sees three body baselines plus one title: the 22pt line is 1.83× body size, so Markdown mode emits ## Quarterly Report. The 18pt gap matches the page's line spacing, so the two body lines reflow into one sentence; the 36pt gap is exactly twice the spacing, so a paragraph break lands before "2026 results were strong." The output is 18 words in three blocks, and with de-hyphenation on, a line ending "quarte-" followed by "rly results" rejoins into "quarterly results" with no space.

Plain mode skips the heading markers and keeps one line per PDF line, which is what you want for logs, invoices, and anything you'll grep.

Frequently Asked Questions

How do I extract text from a PDF for free?

Open the PDF in a browser-based extractor and export. This tool reads the PDF's text layer with pdf.js on your own machine — pick pages if you only need a section, then copy the result or download it as .txt or .md. No account, no upload, no watermark.

Why does my scanned PDF come out empty?

A scan is usually just a photograph of the page with no text layer, and text extraction only reads real text. If the extraction returns nothing or gibberish, the document needs OCR first — optical character recognition turns the page image into text before anything can be extracted.

Does the extraction keep formatting?

Reading order and paragraphs survive; fonts, columns, and exact layout do not. Markdown mode goes furthest — lines noticeably larger than the body text become ## and ### headings, hyphenated line breaks rejoin, and paragraph gaps are preserved from the spacing in the file.

Can I extract text from specific pages only?

Yes. Type a page spec like 1-3, 5 or use the shortcuts all, odd, and even. The extractor reads only those pages, which matters for long reports where you want chapter 2 and not 180 pages of appendices.

Why does the text come out in a strange order?

Extraction follows the PDF's internal text objects, which usually match visual order but don't have to — some generators emit text in drawing order rather than reading order. Multi-column layouts are the classic case. Reading a few lines tells you which kind of file you have.

Is there a file size or page limit?

No artificial limit. Because processing happens locally, the ceiling is your device's memory — reports of a few hundred pages extract in seconds. Password-protected files must be unlocked first, since the text layer can't be read while encrypted.

Advertisement