Repair a broken PDF
Rebuild the internal index of a PDF that refuses to open or shows errors, and save a clean copy.
or drop them here · files stay on your device
We count formats and sizes. Filenames stay private unless you opt in.
- Runs on your device
- No sign-up or watermark
- No fixed file size cap
The short answer
To repair a corrupted PDF, open it in damnfiles Repair a broken PDF and press Try to repair it. pdf-lib reads every object it can find, skipping invalid ones, then writes a new file with a freshly built cross-reference table, in your browser and without uploading. It fixes broken structure, not content that is already missing.
How to repair a corrupted PDF file
- STEP 1
Choose the damaged PDF
Drop one or several files on the page. They stay on your device throughout.
- STEP 2
Run the repair
Press Try to repair it. There are no settings: every readable object is collected and rewritten.
- STEP 3
Check the recovered pages
The report shows how many pages were recovered for each file. Open the -repaired copy to confirm.
What a cross-reference table is, and why it breaks
Near the end of every PDF is a cross-reference table: an index giving the byte position of every object in the file. Readers use it to jump straight to pages, fonts and images. If a download is cut short, a file is edited by a buggy tool, or bytes are altered in transit, the offsets stop matching and readers report the file as damaged.
Often the objects themselves are fine and only the index is wrong. Rebuilding the index from the objects that are actually there brings such files back. A file truncated halfway through has genuinely lost its later content, and no repair can recreate it.
What survives, and what does not
Instead of trusting the existing index, the parser scans the file from start to finish and collects every object it can read, ignoring ones it cannot. It then saves a new PDF with compressed object streams and a new cross-reference table. The document's metadata is left as it was.
What you keep
Every page and object that could still be read
Text, images, fonts and metadata from the readable parts
Batch: several damaged files in one pass
What you lose
Content that was already lost or truncated cannot be recovered
Objects too damaged to parse are dropped
Password-protected files are not decrypted
Honest limits are published on every tool page. If a tool cannot do something well, it says so here rather than letting you find out after the download.
Repair a broken PDF at a glance
| Input | PDF, one or many |
|---|---|
| Output | PDF (-repaired) |
| Method | Lenient reparse, rebuilt cross-reference table |
| Runs on | Your device, in the browser |
| Engine | pdf-lib |
| Works offline | After the first use |
If something goes wrong
It says the file is damaged beyond recovery
The header or core structure is missing, or the file is not really a PDF. Check its size: a 0 KB file or one that is suspiciously small was cut off before it finished downloading.
The repaired file opens but pages are blank
Those pages' content streams were damaged or missing in the original. Try obtaining a fresh copy from the sender or the original source document.
Fewer pages were recovered than expected
The page tree itself was damaged, so some pages are no longer reachable. Re-download the file if you can; repair cannot invent missing pages.
Repair a broken PDF questions
How do I repair a corrupted PDF for free?
Choose the file and press Try to repair it. If the objects inside are readable, you get a new copy with a rebuilt index that opens normally. There is no account or watermark.
Is the damaged PDF uploaded?
No. Repair runs in your browser with pdf-lib, so a broken bank statement or contract never leaves your device.
Why does my PDF say "failed to load PDF document"?
Usually the download was interrupted or the file's internal index is out of step with its contents. Try downloading it again first; if that copy fails too, run it through this repair.
Can every corrupted PDF be fixed?
No. Structural problems like a broken cross-reference table are fixable. A file truncated mid-way has lost its later content, and that content cannot be brought back.
Will repairing a PDF change how it looks?
It should not. The readable objects are written back as they were. Only the file's internal layout and index are rebuilt.