How to extract text from a PDF
- Add a PDF by clicking the dashed box or dragging the file onto it.
- Press Extract Text. The progress bar moves through the pages.
- Download the result. It is named after your PDF with a
.txtextension, soreport.pdfbecomesreport.txt. - Open it in any text editor. The text of each page is followed by a blank line.
How the extraction works
The tool uses PDF.js, Mozilla's open-source PDF engine, inside your browser. For every page it asks PDF.js for the page's text content – the strings of characters that the PDF draws. The pieces found on a page are joined with spaces, pages are separated by a blank line, and the result is saved as a UTF-8 text file. No server, no AI and no guessing are involved: you get exactly the text the PDF contains, and your file never leaves your device.
It helps to know that a PDF is not a word-processing document. It stores instructions such as "draw these characters at this position", usually without any notion of paragraphs, lines or columns. The order of the text is the order in which the software that created the file wrote it down – normally, but not always, the order you read it in.
What to expect in the output
- Each page comes out as one continuous block: line breaks inside a page are not kept.
- Words hyphenated at the end of a line stay split, for example "docu- ment".
- Two-column layouts can come out interleaved, and tables turn into runs of cell values separated by spaces.
- Headers, footers and page numbers are included, and occasional double spaces appear.
- Text inside images – logos, screenshots, scanned pages – is not extracted at all.
Tips
- Test before you start: try selecting text in your PDF viewer. If you cannot select it, that page is an image and this tool will return nothing for it.
- Tidy up with find and replace: remove repeated headers, or search for "- " to find words that were split at the end of a line.
- Need only part of the document? Extract the pages with Split PDF first.
- Tables: for spreadsheet-ready data, the free desktop program Tabula is designed for extracting tables from PDFs to CSV.
Useful for
- Quoting a report or article without retyping it.
- Feeding text into a translator, word counter or search tool.
- Checking what text a screen reader or search engine can actually "see" in your PDF – if a page comes out empty, it is not accessible.
- Checking whether a "blacked-out" document really hides its text: if the covered words appear in the output, the redaction did not work.
- Recovering the wording of a document whose original file is lost.
Limitations and alternatives
- No OCR. Scanned PDFs and photos of documents contain pictures of text, so the output stays empty. Use an OCR tool instead: OCRmyPDF (free, adds a searchable text layer to scans), Tesseract, Google Drive's "Open with Google Docs", or the text-recognition features built into phones such as Live Text or Google Lens.
- Garbled symbols: some PDFs embed fonts without a proper mapping from glyphs to characters. The page looks fine but extraction yields nonsense – copying from any viewer gives the same result, and only OCR helps.
- No formatting: fonts, bold text, images and layout are dropped. Microsoft Word can open many digital PDFs as editable documents if you need the layout.
- Passwords: PDFs that need a password to open are not supported. Some files with Chinese, Japanese or Korean text that rely on non-embedded fonts may extract incompletely.
Frequently asked questions
Why is my text file empty?
The PDF has no text layer – it is a scan or a set of photos. The pages contain images of text, which need OCR (optical character recognition) to be turned into real text.
Can this tool do OCR?
No. It extracts text that is already stored in the PDF. For scanned documents use an OCR tool such as OCRmyPDF, Tesseract or Google Drive's "Open with Google Docs".
Why are all the lines of a page joined together?
The tool joins the text pieces of each page with spaces and separates pages with a blank line. Line breaks inside a page are not kept, because a PDF usually does not store them as text.
Can I convert a PDF into an editable Word document?
Not here – the output is plain text without formatting. Microsoft Word can open many digital PDFs directly and convert them into editable documents.
What encoding does the TXT file use?
UTF-8, which every modern editor reads correctly, including accented and non-Latin characters.
Why does the output contain strange symbols?
The PDF embeds a font without a correct mapping from glyphs to characters. The text looks right on screen but cannot be extracted faithfully by any tool; OCR is the workaround.
Are my files uploaded?
No. PDF.js reads the file in your browser and the text file is created on your device.
Related tools
- PDF to JPGGet pages as images, for example as OCR input.
- Text to PDFTurn edited plain text back into a PDF.
- Split PDFExtract only the pages whose text you need.
- Merge PDFCombine several documents before extracting.
Further reading: Handling sensitive PDFs: local processing vs uploading.