Z

PDF to Text

Extract the text content from a PDF in your browser using pdf.js. Copy or download as plain text.

Runs in your browser — files never leave your device

Note: scanned PDFs (images of text) have no selectable text — use an OCR tool for those.

How it works

Most PDFs made on a computer — exported reports, invoices, e-books, papers — carry a text layer: the actual characters, stored alongside instructions for where each fragment sits on the page. This tool reads that layer with pdf.js, the open-source engine behind Firefox’s PDF viewer, and turns it into plain text you can copy or download as extracted.txt.

Extraction is deliberately simple: the text fragments of each page are joined with spaces, stray whitespace is collapsed, and each page becomes one block separated from the next by a blank line. You get the words, not the layout — paragraph breaks, columns and tables aren’t reconstructed, and running headers, footers and page numbers come along with everything else. For quoting, searching, word counts or feeding text to another tool, that’s exactly what you want; for a faithful reflow of a complex layout, it isn’t.

The important limitation: scanned PDFs yield nothing. A typical contract that went through an office scanner is a series of photographs of paper — there are no characters in the file, only pixels, so extraction comes back empty. Recovering text from images requires OCR (optical character recognition), which this tool doesn’t do. The quick test: if you can select text in a PDF viewer, it will extract here; if you can’t, it won’t.

Everything runs locally in your browser. The document is never uploaded, so extracting from confidential material — agreements, statements, unpublished drafts — carries no more risk than opening the file on your own machine.

Frequently asked questions

Why did my PDF return no text at all?
Almost certainly because it’s a scanned document: the pages are photographs of paper, and photographs contain pixels, not characters. There is no text layer to read, so extraction comes back empty. Such files need OCR (optical character recognition), which this tool deliberately doesn’t attempt.
How do I tell a text PDF from a scanned one?
Open the file in any PDF viewer and try to select a sentence with your mouse. If the text highlights, there’s a real text layer and this tool will extract it; if your cursor just draws a box over the page, it’s an image. Scans that went through OCR carry an invisible text layer and will extract normally.
Why don’t the line breaks match the original?
Extraction flattens each page into one continuous block: the text fragments are joined with spaces, runs of whitespace are collapsed, and pages are separated by a blank line. Paragraph breaks, columns and table layouts aren’t reconstructed — you get the words in the order the file stores them, which is usually reading order but can jumble in multi-column layouts.
Are headers, footers and page numbers included?
Yes. Everything in the text layer is extracted, including running headers, footers and page numbers, so expect those to repeat throughout the output. Strip them in a text editor afterwards if they get in the way.
Why does the output contain garbled characters?
Some PDFs use fonts without a proper character-to-Unicode mapping, so the file itself doesn’t know which letters its glyphs represent. Extraction then produces wrong or unreadable characters. That’s a defect of the document, and rasterizing plus OCR is usually the only workaround.
Can it read password-protected PDFs?
No — there’s no password prompt, so encrypted files fail with an error. Open the file with its password in a PDF viewer, save an unprotected copy, and extract from that.
Is my document uploaded for processing?
No. The PDF is parsed by pdf.js entirely inside your browser, and the extracted text lives only on this page until you copy or download it. Nothing is transmitted, stored or logged — safe for contracts, medical records and anything else confidential.