PDF to Text
Pull the words out of a PDF. Paragraphs are put back together, split words are rejoined, and the text never leaves your device.
Runs entirely in your browser — nothing is uploadedThe text
What this does
This pulls the words out of a PDF and hands them back as plain text — to paste somewhere, to search, to feed into something else, or to download as a .txt file. It runs in your browser, so the document is never uploaded.
Why extracting text from a PDF is harder than it sounds
A PDF does not contain text in the way a text file does. It contains instructions to paint particular glyphs at particular coordinates. The reading order, the paragraphs, the columns, even the spaces between words are not stored anywhere — they are things you infer from where the marks landed. Every extractor has to make the same inferences you do when you look at the page, and the differences between good and bad ones are all in how well they guess.
Three of those guesses matter more than the rest, and this is what happens to each:
- Line breaks are not paragraph breaks. Prose is broken to fit the column, so a naive extractor hands back text with a hard break every ten words that will not re-wrap in anything. Paragraphs mode joins those lines back up, using the signal that is genuinely in the geometry: a line that reached the right margin was broken by the typesetter, and a line that stopped short ended a paragraph.
- Columns share their baselines. On a two-column page, the first line of the left column and the first line of the right sit at exactly the same height. Group the glyphs by height — which is the only way to find lines at all — and you get one sentence from each column, alternating, for the whole page. This divides the page into columns before it looks for lines, so each column is read through to its end first.
- Ligatures are not letters. Most typesetting replaces "fi" with a singlefi glyph, and "ffi", "fl" and several others the same way. That glyph survives into the extracted text, so "define" comes out as a word that looks right and does not match a search for "define" — which is usually the entire reason someone wanted the text. These are always turned back into ordinary letters, along with soft hyphens and the half-dozen invisible spacing characters that cause the same problem.
The three modes
There is no single correct answer, so pick the one that matches what you're going to do:
- Paragraphs rejoins wrapped lines into continuous paragraphs. This is what you want for pasting into a document, feeding into another program, or reading. It is the default because it is right for prose, which is most PDFs.
- Line by line keeps every break exactly where the PDF put it and joins nothing. Useful when the line breaks carry meaning — poetry, code listings, addresses — or when you want to see what was really there before anything was inferred.
- Keep the layout places each line where it sat on the page, padding with spaces. Columns stay side by side and table rows stay lined up, so a table is still readable in a text editor. This is the mode for anything whose meaning is in its arrangement.
Split words
When a word is broken across a line — "inter-" then "national" — the hyphen was added by the typesetter and should go. When the hyphen is real, as in "well-known", it should stay. Nothing in the file distinguishes them, but the geometry helps: a typesetter's hyphen only ever appears on a line that ran out of room, so a hyphen on a line that stopped short is always kept.
A capital letter after the break is also a good sign the hyphen is real — "MIT-Stanford" rather than a split word — so those are kept too. What is left is genuinely ambiguous, and rejoining is right far more often than not, which is why it is on by default. Turn it off if you would rather see exactly what was in the file.
Scanned PDFs have no text in them
If your PDF came from a scanner or a phone camera, its pages are pictures. There is nothing to extract, and a tool that hands you an empty file without saying so has wasted your time. This checks, tells you which pages are images, and points you atOCR PDF, which recognises the words and writes them back into the document. Extract from the result of that and you'll get your text.
Is it private?
Yes. The PDF is read and the text assembled by JavaScript inside this page. Nothing is transmitted, nothing is stored, and there is no server on the other end to receive it. Once the page has loaded you can disconnect from the internet and it will still work — which is worth knowing if the document is a contract, a payslip or anything else you would rather not hand to a website.
Frequently asked questions
Why is the text in a strange order?
Usually a layout this didn't manage to divide — a sidebar, a pull quote, or a complicated magazine page. Try Keep the layout, which makes no attempt to guess the reading order and shows you the page as it sits, so you can see what went where.
Some characters came out wrong
A PDF can embed a font with a broken or missing character map, in which case the file genuinely does not record which letters its glyphs represent — the page renders correctly and the text underneath is nonsense. Nothing can fix that by reading the file; running it throughOCR PDF to recognise the picture of the page is the way round it.
Can I get the tables out properly?
Keep the layout keeps them lined up as text. If you want them as actual rows and columns, PDF to Excel detects tables and writes a spreadsheet, which is a different job done properly.
What about the formatting — bold, headings, sizes?
Plain text has none of those by definition. PDF to Word keeps the styling, the headings and the images; this deliberately throws all of it away, which is the point when what you want is the words.
Why is my file password-protected message showing?
A PDF that needs a password to open cannot be read at all until it is unlocked. Open it in a reader with the password, save an unprotected copy, and extract from that.