How to Extract Text from a PDF (Including Scanned PDFs)
By the FreePDF team ·
Copying a paragraph out of a PDF should be simple, but a PDF can hold words in two very different ways. A normal digital PDF contains real characters you can select. A scan contains pictures of characters, even though the page looks exactly like text to you. The first kind can be extracted directly; the second needs OCR to read the page images first.
Extract the text into a .txt file
- Upload your PDF to the PDF to Text tool.
- Leave OCR off for a normal digital PDF. Turn it on if the file is a scan or photo and its words cannot be selected.
- Download one plain
.txtfile containing the text from every page.
How to tell whether you need OCR
Open the PDF and try to select one sentence. If you can highlight and copy the individual words, the file already has a text layer and OCR should stay off. Direct extraction is faster and preserves the original characters instead of guessing what they are.
If dragging across the sentence selects a whole page like an image, or nothing at all, turn OCR on. It recognises letters from the page image before creating the text file. Clear, straight, high-contrast pages work best; blurred photos, handwriting, faint printing, and unusual typefaces cause more mistakes.
Choose plain text, Word, or Markdown
- Plain text is the cleanest choice when you only need the words: searching a document, pasting into another app, feeding a script, or preparing text for an AI tool. It deliberately drops fonts, images, columns, and tables.
- Word is better when you want to edit the document while keeping as much of its original layout as possible.
- Markdown sits between the two. It stays readable as plain text but keeps lightweight structure such as headings, lists, links, and simple tables.
Why extracted text sometimes looks untidy
A PDF is designed to place content at exact coordinates on a page, not to describe the reading order of a document. That is why text from a two-column report may alternate between columns, a header may appear in the middle of a paragraph, or every printed line may become a separate line in the text file. Plain text cannot reproduce a page layout. If that structure matters, Word or Markdown is usually a better output.
Common questions
Can I extract text from only a few pages?
Yes. Split or extract the pages you need into a smaller PDF first, then run that file through PDF to Text. The resulting text file will contain only those pages and will be easier to work with.
Does extracting text change the original PDF?
No. The tool reads the PDF and creates a separate .txtdownload. It does not edit, overwrite, or add an OCR layer to the PDF you uploaded.