Recover text from a damaged PDF: the honest options
By the getPDF team · Published 11 October 2026
The short answer
Drop the file on PDF to Text below: if the engine can open it, you get every word it can reach as a .txt file. If it says the file or a page “could not be read”, drop the file alone on Merge PDF first; that writes a clean copy of every page that survives, and PDF to Text reads the copy. When pages look right but the text comes out as nonsense, OCR reads the pages the way your eyes do. What was after a cut in the file is gone; recovery gets words out, not the original document back.
Try it here, nothing is uploaded
What recovery can and cannot give you
Set the expectation first. Recovery gets the words (and, with other tools, the pictures) out of a damaged file. It does not resurrect the file: the text comes out as plain lines, page by page, without the layout. And it gets only what is still in the file. A transfer that stopped halfway never wrote the second half to your disk.
Which route you need depends on how the file is broken. We damaged copies of a 48-page text report and measured each route; the numbers below are from that test.
Route 1: PDF to Text on the file as it is
When the damage is in the file’s index (the table at the end that says where everything sits), the engine rebuilds it on the fly and nothing is lost. Our test file with the index wiped out, pointing to the wrong places, or with stray bytes in front of it gave the same 140,654 characters from all 48 pages as the undamaged original.
- Drop the file on the tool above.
- Under Between pages, pick Empty line, Page 2 (a line naming each page) or Page break.
- Press Get the text and save the .txt file. It is UTF-8, so every accent and alphabet comes through.
If a page has no text, the result names it. That usually means a scanned page, which needs OCR (route 3).
Route 2: a clean copy first, when PDF to Text stops
Two messages mean the file needs a copy before its text can come out:
- “Page 23 could not be read.” One page is damaged and the tool stops there. In our test, 4 KB of zeros in the middle of the file broke pages 23 and 24.
- “could not be read as a PDF.” The engine cannot open the file at all. In our test this happened to a file whose last 2 % (the index and the trailer) was missing.
The way round both is Merge PDF, which reads files with a second, more forgiving parser:
- Drop the damaged file alone on Merge PDF. The file list may call it “cannot be read”; that label comes from the first engine. Press Merge anyway.
- Read the result. On our overwritten file it said “Combined 1 file into 46 pages” and warned that the file “is damaged: 2 of its 48 pages could not be read, so they are not in the result”. It does not say which 2. The copy numbers its pages 1 to 46, so look for the place where the page numbers printed on the pages jump.
- Save the copy (it is named with -merged).
- Drop the copy on PDF to Text and take the text as in route 1.
On our tests this gave all 48 pages from the file missing its end and 46 of 48 from the overwritten one. It does not help when a file is cut through its pages: at 90 % of its length, nothing here could read our test file. Try it in Firefox or the Mac’s Preview, which use different engines, and copy what they show.
Route 3: OCR, when the text comes out as nonsense
Sometimes the pages look right but the text is garbage: /HDVH DJUHHPHQW where the page says “Lease agreement”. That is not damage to the file’s structure; the font has lost its map from shapes to letters, and every tool reads the same nonsense. The boxes and gibberish guide explains why. The words survive in the picture of the page, so read the picture:
- Turn the pages into pictures with PDF to JPG: set Resolution to 300 and Several pages to “as separate files”.
- Drop all the pictures on JPG to PDF, in page order, for one PDF with a page per picture.
- Run OCR PDF on that file in the document’s language, then PDF to Text on the result.
On our test page this gave clean text at 91 % average confidence, with a few misread words (“agreenent”, “Cctober”) to correct by hand. The shortcut, OCR straight on the original with Pages with text set to “read again too”, works too (85 % on the same page), but the garbage stays in the file and comes out first in the text, so you delete those lines yourself.
What is not coming back
- Anything after a cut. Those bytes were never saved. A fresh download or the sender’s copy is the only source.
- Pages the damage hit. Our overwritten test lost 2 pages for good; the 46 around them were fine.
- Blank pages. When the instructions that draw a page are damaged, the page shows blank in every viewer, and OCR has nothing to read. PDF to Text then says the file has no text and is “probably scanned”; on a damaged file that guess is wrong, and the text is simply gone.
- The layout. Recovered text is lines, not the document. Headings and tables can be rebuilt from a clean copy with PDF to Markdown, which works them out from font sizes and positions.
getPDF has no repair tool yet; one is planned, and until it ships these routes are the way. Every one of them runs in your browser, so a damaged contract or medical record never leaves your device on its way back to readable text. For the full map of broken files, see the broken PDF guide; for what a “damaged” error actually reports, see the file is damaged error.
Questions
How much text can I get back from a damaged PDF?
Everything that was written before the damage, as a rule. In our tests a file with a broken index gave all 48 pages of text; one with 4 KB overwritten in the middle gave 46 of 48. A file cut through its pages gave nothing to any tool.
Will the recovered text keep its layout?
No. PDF to Text writes the words line by line and page by page, in the order the file stores them. Columns, tables and fonts are not kept. For headings, lists and tables as structure, run PDF to Markdown or PDF to Word on the clean copy instead.
Why does PDF to Text stop with "Page 23 could not be read"?
One page of the file is damaged, and the tool stops at the first page it cannot read. Make a copy without the broken pages first (drop the file alone on Merge PDF), then run PDF to Text on that copy.
Is my document uploaded anywhere?
No. Every tool on this page runs in your browser on your device. You can check: use a tool once, then turn Wi-Fi off, and it still works.
The tools for this job
Keep reading
- Fix a broken PDF free: find the real fault, recover what you canA broken PDF is usually a cut-short download, not deep corruption.
- "The file is damaged and could not be repaired": what it meansThe file is damaged and could not be repaired: what the error means, which damage still opens elsewhere, and what a free check on your device can recover.
- Make a scanned PDF searchable, free, without changing how it looksOCR a scanned PDF on your device: free, no account, nothing is uploaded.
- PDF text shows as boxes or gibberish: what broke and what fixes itPDF text shows boxes or gibberish when fonts are not embedded or their letter map is missing.
- Cannot select or copy text in a PDF: the 3 causes and their fixesText in a PDF will not select or copy for 1 of 3 reasons: a scan, a copy restriction, or a font that hides the letters.