How to repair a damaged PDF
Last updated: September 6, 2026
'The file is damaged and could not be repaired', 'couldn't open this PDF', a document that half-renders and dies. Almost always the same root cause, and usually fixable. Here's what breaks, and how to rebuild it.
Use our free Repair PDF tool. Fast and secure.
Rebuilding a broken file, step by step
- Open the Repair PDF tool.
- Select or drag in the file that won't open.
- Press Repair PDF. The tool scans the whole file, finds the surviving objects, and writes a fresh internal structure around them.
- Download the working file, or read the honest error if the damage turns out to be beyond repair.
What's really happening when a PDF "can't be opened"
It helps to picture how a PDF is built. It isn't one continuous stream of text; it's a bundle of numbered objects (each page, font, and image is an object) held together by a small index at the end called the cross-reference table, or xref. That table records the exact byte offset of every object, so a reader can jump straight to object 47 without reading the whole file. It's efficient, but it's also fragile: the index only works if every offset still points where it should.
Break that index and the whole document appears dead. A download cut off halfway, a laptop that loses power mid-save, a sync conflict, a flaky USB stick: any of these can leave the offsets pointing at the wrong bytes. The reader follows the map, lands on garbage, and shows you "the file is damaged" or "couldn't open this PDF." The frustrating part is that in most of these cases the actual page content is still sitting in the file, perfectly intact; it's only the signposting that's wrong.
What repair can fix, and what it honestly cannot
Repair works by ignoring the broken index and rebuilding it from scratch. It reads the entire file byte by byte, recognizes the objects wherever they actually sit, and writes a brand-new cross-reference table with correct offsets around the content it recovered. That resolves the large majority of "won't open" files.
| Repairable (structural damage) | Not repairable (missing data) |
|---|---|
| Broken or missing cross-reference table | Pages that were never fully downloaded |
| Damaged object streams that still contain their data | Content overwritten by other data |
| A file truncated at the very end during a bad save | Bytes lost to severe corruption, beyond recognition |
The line it can't cross is inventing bytes that aren't there. If a download stopped at page 30 of 40, the last ten pages simply do not exist in the file, and no tool can reconstruct text that was never received. When that's the case, the honest fix is to re-download or re-export the original. We'd rather tell you the content is gone than hand you a hollow "repaired" file that opens to blank pages.
Where the file goes while it's being fixed
This tool uses a server implementation for structural repair, so your file does travel to our server over HTTPS. qpdf rebuilds it using temporary server files in a separate job directory. Cleanup is attempted when processing ends, but immediate or secure deletion cannot be guaranteed; uploads are size- and rate-limited. That upload is the cost of the fix; for a document that's both broken and highly confidential, weigh it up first. Our are online PDF tools safe guide can help.
Stopping it happening again
- Keep the original, not just the download. A downloaded copy can break; the source you exported it from usually can't.
- Open important files right after creating them. Some writers close badly after a crash, and it's better to find out immediately.
- Treat recurring damage as a hardware warning. If a fresh copy corrupts too, the storage is failing; replace the disk before it takes other files with it.
Common questions
Will repair change my document's content? No, only its internal plumbing. Pages, text, images and metadata are copied as-is into the rebuilt structure; nothing visible changes.
The repair failed. Now what? If the file was truncated in transit, re-download the original. If storage corrupted it, restore from a backup. If neither exists, the contents are genuinely lost.
Can you recover a specific missing page? Only if its data is still in the file. If those bytes never arrived, they can't be rebuilt.
Is there a size limit? Yes. Uploads are capped and rate-limited, so very large files may need to be handled in parts.
Related tools
Once a file opens again you might want to compress it or tidy its structure with Optimize PDF. If the recovered file is a scan you can't search, run OCR PDF to add a text layer.