Extract text from PDF
Pull a PDF's text out and save it as a plain text file.
or drop files anywhere on this page
Your files stay in this browser. Nothing is uploaded.
About PDF to Text
To extract text from a PDF, add the file and this tool writes the text already inside it to a plain .txt file. It runs entirely in your browser, rebuilding reading order line by line and leaving a blank line where the spacing between lines suggests a new paragraph.
Reach for it when you want a PDF’s wording without any of its formatting, ready to paste, search or feed into another program. It only reads text that is already there; a scanned page has none until it has been through OCR.
How it works
- Add one or more PDFs. Any file that asks for a password to open gets its own box to type it into, and Extract text will not start until every one of them has been accepted.
- There are no options to set; every page’s text is extracted in order.
- Click Extract text.
- Download the .txt file: one per input PDF, named after the PDF, and zipped when there is more than one.
- Open it in any text editor. Pages are separated by a form-feed character, which most editors show as nothing or as a small symbol.
What ends up in the .txt file
The tool reads the text layer of each page, the same characters you could select with a cursor, and writes them out as UTF-8 with no byte-order mark. Nothing is recognised from pictures and nothing is added. Images, drawings, fonts, colours and bold or italic styling are left behind; only the characters remain.
Lines are built by grouping text that sits on the same baseline, to within 2 points, and reading each group from left to right. A gap wider than about a third of the text height becomes a space, and a blank line appears wherever the step down from one line to the next is more than one and a half times the height of the line above. Every visual line becomes one line in the file, so a paragraph arrives hard-wrapped at the width it had on the page, and a word hyphenated across two lines stays split.
Pages are separated by a form-feed character (U+000C). It is invisible in most editors, and easy to find and replace if you would rather have a few blank lines between pages. The tool sets no page count or file size limit of its own, so the practical limit is your device’s memory.
Scans, mixed files and garbled text
A scanned PDF stores each page as a picture, so there is no text to read. If no page in a file has any text at all, the tool stops with "This PDF has no text layer — it is probably a scan. Run OCR first to make it searchable." instead of handing you an empty file. The OCR tool adds a recognised text layer behind the page images, and its output can then be run through this one. OCR downloads its language data the first time you use it, so that step needs a connection.
The check is made per file, not per page. A PDF that mixes typed pages with a scanned insert gives you the typed pages’ text and nothing for the scan, without a warning, so the .txt can look shorter than the document. If you add several PDFs and one of them is a scan, the whole run stops with that message and none of the files are produced; take that one out, or OCR it, and run again.
A few PDFs look right on screen but extract as gibberish. That can happen when a file’s fonts do not map their shapes back to real characters, which is a fault in how the file was made rather than something this tool can repair. Exporting the PDF again from the program that created it is the dependable fix.
Worked example: a 12-page report
Take a 12-page quarterly report exported from a word processor, needed as wording for an email summary. Add it, click Extract text and download report.txt. Headings and paragraphs come through as lines of text, with a form-feed between each pair of pages.
A table of figures in the same report arrives as rows of numbers separated by spaces, with no tabs and no alignment. If the numbers are what you need, the PDF to Excel tool is a better starting point than pasting from this file. If you only need a few pages, use the Extract Pages tool first, because this one always reads every page.
Frequently asked questions
A scanned page is an image with no text layer, so there is nothing to pull out and you’ll see an error rather than an empty file. Run the OCR tool on the PDF first to give it a text layer, then extract the text from the result.
Text is rebuilt by position: everything on the same baseline is joined into one line from left to right, then the lines are read from top to bottom. That works well for a single column. On a page with two columns, a line from the left column and the line beside it on the right are joined into one row, so the columns interleave instead of reading one after the other, and callout boxes behave the same way. The PDF itself has no notion of reading order, so check multi-column pages by eye.
Not visually. Text is rebuilt line by line in reading order, with a blank line where there is extra vertical space between lines, and a form-feed page break between pages; the exact spacing, indentation and columns you see in the PDF are not reproduced.
Plain UTF-8 text (.txt), so accented and non-Latin characters come through correctly in any text editor.
Not from this tool directly, since it reads every page of each PDF you add. If you only need part of a document, use the Extract Pages tool to pull those pages into their own PDF first, then run this tool on that smaller file.
Yes. Add them all together and you get one .txt file per PDF, bundled into a ZIP.
No. The PDF you added is not changed at all; this reads its text and writes a separate .txt file alongside it.
Yes, as long as you can type the password in yourself. A PDF that asks for one shows a box beside the file, and Extract text becomes available the moment the document opens with what you typed. A PDF that only carries restrictions, and does not ask for a password to open, is read without a prompt.
No. The file is opened and read by code running in your browser tab, and the .txt file is built there too, so neither the PDF nor its text is sent to a server. The page itself has to load over the network first, as any web page does.
No. Cells on the same row are joined into one line with a space where there is a gap, with no tabs or column alignment, and a table beside other text can interleave with it. For numbers you want in a spreadsheet, the PDF to Excel tool is the better start, though that is a conversion that can lose detail too.
Related tools
This tool ran entirely in your browser and nothing was uploaded. Your Recent files list keeps a copy of local files under 5 MB until you clear it. How your files are handled.