How to Extract All the Text From a PDF
By Donald Paul · · 3 min read
There are plenty of reasons to want the raw text from a PDF. You might want to paste a report into an email, feed a document into a spreadsheet, quote a passage, count words, translate it, or simply read it without the layout getting in the way. Copying and pasting page by page works for a paragraph, but it is tedious for a 60-page document, and it often drags in odd line breaks.
A dedicated PDF to text conversion gives you all the words in one go.
First, find out what kind of PDF you have
This one check saves a lot of frustration. Open the PDF and try to select a sentence with your cursor.
- If the text highlights, the PDF contains real text. Extraction will be fast and accurate.
- If the whole page highlights as one block, or nothing happens, the page is an image, usually a scan or a photo. You need OCR (optical character recognition) to turn the picture of letters into actual text.
Method 1: Text-based PDFs
- Open PDF to Text.
- Choose your file. Processing happens in your browser, so the PDF is not uploaded.
- Download the resulting .txt file.
- Open it in any text editor, notes app or word processor.
That is it. Plain text files are tiny, open on every device and can be pasted anywhere.
Method 2: Scanned PDFs
- Run the file through OCR PDF first. Choose the language of the document; pdfwall supports many languages including Hindi, Telugu and Tamil.
- Download the OCR'd PDF, which now has a hidden, searchable text layer.
- Open that file in PDF to Text and download the text.
For a single photo or screenshot rather than a PDF, Image to Text skips the PDF step altogether.
Getting better OCR results
- Scan at a decent resolution; very low resolution scans produce more errors.
- Straighten and crop pages so the text runs horizontally.
- Avoid shadows across the page when photographing.
- Always proofread numbers. OCR can confuse 0 and O, 1 and l, or 5 and S.
Cleaning up the extracted text
PDFs store text by position on the page, not as flowing paragraphs, so the output often needs light tidying.
Line breaks mid-sentence
Each printed line may end with a line break. In most word processors you can use find and replace to swap single line breaks for spaces while keeping double line breaks (paragraph gaps). Do the double breaks first by replacing them with a placeholder, then replace single breaks, then restore the placeholder.
Headers, footers and page numbers
Repeated lines like "Annual Report 2026 · Page 14" will appear throughout. Use find and replace on the repeated phrase to remove them in one step.
Columns that come out mixed
Two-column layouts can extract in an unexpected order. If that happens, try cropping the PDF to one column at a time, or convert to Word with PDF to Word, which tries harder to preserve layout.
Hyphenated words
Words split across lines like "docu- ment" need rejoining. Search for "- " followed by a lowercase letter.
When plain text is not the right choice
Plain text throws away formatting: bold, tables, images and fonts. If you need to keep those, choose a different output:
- PDF to Word if you want to edit with formatting intact
- PDF to Excel for tables of numbers
- PDF to HTML for putting content on a web page
And if your real goal is to understand a long document quickly rather than reuse its wording, the AI PDF Summarizer may save you more time than extracting everything.
Common mistakes
- Running text extraction on a scan and getting an empty file. OCR first.
- Assuming OCR output is perfect. It rarely is for poor scans.
- Extracting text from a password-protected file you cannot open. You need the password; Unlock PDF only works when you know it.
FAQ
Why is my extracted text file empty?
The PDF almost certainly contains images of text rather than real text. Run OCR first.
Will special characters and non-English scripts come through?
Text-based PDFs usually extract their characters correctly. For scans in Indian languages, select the correct language when running OCR.
Can I extract text from only a few pages?
Yes. Use Extract pages to save just the pages you want into a new PDF, then convert that file.
Once you know whether your PDF is text or an image, pulling out the words takes less than a minute.