Extract Text from PDF
Read the text layer out of a PDF and copy it or download it as a .txt file. Nothing is uploaded.
Processed on your device — no upload
How to extract text from PDF
- Choose the PDF you want the words from.
- Decide whether to mark where each page begins.
- Press extract, then copy the text or download it as a .txt file.
How it works
A PDF does not store sentences. It stores instructions of the form “draw this glyph in this font at this coordinate”, thousands of them per page, in whatever order was convenient when the file was written. There are no words, no lines and no paragraphs — only positioned marks.
Extraction means reconstructing language from geometry. The page loads pdf.js, the same engine Firefox uses to display PDFs, and asks it for the text items of each page. Each item carries a string and a flag saying whether a line ends after it, and the tool rebuilds the line structure from those flags rather than guessing from coordinates.
This only works if the PDF has a text layer. A document produced by Word or a web page has one. A photograph of a page does not: it is an image, and no amount of extraction will find words in it, because there are none — you would need OCR, which is a different and much heavier operation. When that happens the tool says so plainly instead of handing you an empty box.
Expect the layout to be lost. Multi-column pages usually interleave, tables come out as loose runs of cells, and headers and footers land inline. That is inherent to the format, not a limitation of this tool: the column structure you see was never recorded, only the positions that happen to produce it.
A worked example
You have a 12-page research paper and you want to quote three paragraphs from the discussion section without retyping them.
Choose the file and leave page markers on. Press Extract text; the status counts through reading page 1 of 12 and so on, and the status line ends up showing roughly 5,800 words.
The output opens with --- page 1 ---, and each page is separated the same way. Those markers are the fastest way to find what you want in a long extraction: the discussion started on page 9 in the PDF, so scroll to --- page 9 --- and the text is right there. Use Copy all and paste, or Download .txt for the whole thing.
What will look wrong: the two-column layout has interleaved, so a line from the left column is followed by a line from the right. The page header repeats every twelfth of the way down. Reference numbers sit on their own lines. All of this is the format showing through — the paper never stored “column one, then column two”, only glyph positions that a human eye resolves into columns.
If the document turns out to be a scan with no text layer, converting the pages to images at least gives you something you can put through an OCR tool elsewhere.
Questions
How do I copy text out of a PDF?
Extract it and you get plain text to paste anywhere. This reads the text layer the document already carries; it cannot scrape a scanned image, which needs OCR.
Is my PDF uploaded to extract the text?
No. The pdf.js engine runs inside your browser and its worker file is served from this site rather than a third party. The document is read from your disk into memory and never transmitted.
Why did I get no text at all?
Almost certainly because the PDF is a scan. Scanned pages are images, so there are no characters to extract — only pixels that look like characters. Reading those requires OCR, which this tool does not do.
Why is the text out of order?
Multi-column layouts are the usual cause. A PDF records where each glyph sits, not that the page has columns, so extraction follows the order the file stores rather than the order you read.
Are tables preserved?
No. A table in a PDF is usually just text positioned in a grid, with no structure recorded. The cells come out as a sequence of text runs, which you will need to reassemble.
What are the page markers for?
They insert "--- page N ---" between pages so you can find your place in a long extraction. Turn them off if you want continuous prose to paste elsewhere.
Can I extract text from a password-protected PDF?
Not while it is encrypted. Open it in your reader with the password, save an unprotected copy, and extract from that.
What encoding is the .txt file?
UTF-8, so accented characters and non-Latin scripts survive. If your text editor shows them as garbage, tell it to open the file as UTF-8.
Why did the copy button fail?
Some browsers block clipboard access in certain contexts. Select the text in the box and copy it manually, or use the download button instead.
How do I get text from a PDF I cannot copy from?
Extract text from PDF files here and you will get whatever text layer the document carries, even when the viewer makes selecting awkward. What you cannot get text from is a scan: a photograph of a page holds no text objects at all, only pixels, and reading those needs OCR rather than extraction.
How do I get text from PDFs I did not write?
Extract text from PDFs the same way regardless of who made them — the text layer is read out as it is stored. Get text from PDF files that were typed and you will get everything; get text from a scan and you will get nothing, because a photograph of a page holds no text at all.