How to extract text from a PDF
- Drop a PDF onto the drop zone above, or click to select it.
- Click Extract text. The text of every page is read in order and shown in a preview box, with a marker such as
--- Page 2 ---at the start of each page. - Copy the text from the preview box, or download it as a plain
.txtfile (UTF-8).
Extraction is done by pdf.js, the same engine that powers Firefox's built-in PDF viewer, running in your browser tab. The document is not uploaded, so you can safely pull text out of contracts, research papers or statements.
How PDF text extraction works
Inside a PDF, each page has a content stream: a list of drawing instructions such as "use font F1 at 11 points, move to position (72, 700), show these characters". Text is therefore stored as positioned fragments, sometimes a whole line, sometimes a single word or even individual letters.
To turn that back into readable text, the extractor:
- decodes each fragment from the font's internal character codes into Unicode, using the mapping tables embedded in the PDF;
- sorts the fragments by their position on the page;
- inserts spaces and line breaks where the gaps between fragments suggest new words and new lines.
Because the PDF has no explicit notion of paragraphs or reading order, the output is plain text with line breaks rather than formatted paragraphs. For most documents (letters, reports, books, articles) the result reads naturally.
Limitations
| Situation | What you will see |
|---|---|
| Scanned or photographed pages | No text – the page is an image, and OCR is not provided |
| Multi-column layouts | Columns may be interleaved line by line |
| Tables | Cell values on lines, without a grid |
| Fonts without a Unicode mapping | Garbled or missing characters |
| Password-protected / encrypted PDF | The file cannot be opened |
A quick test tells you what to expect: open the PDF in any viewer and try to select a sentence. If you can highlight and copy it, the text can be extracted. If the whole page highlights as one block, or nothing highlights, it is an image.
Tips
- Want to keep headings and paragraphs instead of plain lines? Use PDF to Word in editable mode.
- For figures arranged in tables, PDF to Excel places values into rows and columns.
- Plain text is ideal for search indexes, translation tools, word counts, AI summarisers and accessibility software, because it contains no formatting to strip out.
Frequently asked questions
Why do I get a "No text found" message?
The PDF contains images of text rather than real text, which is typical of scans. Text can only be recovered from such files with OCR software.
Why are some characters replaced with strange symbols?
Some PDFs embed fonts with custom character codes and no Unicode mapping. The viewer can draw the shapes, but there is no reliable way to know which letters they represent.
Is formatting such as bold or font size kept?
No. The output is plain UTF-8 text. Each line of the page becomes a line of text, but fonts, colours and images are not kept.
Can I extract text from only certain pages?
The tool extracts the whole document. To limit it, first save the pages you need as a separate file with Split PDF.