How to Repair a Corrupted or Damaged PDF
September 23, 20265 min readWhy PDFs sometimes stop opening, how a lenient-parser-and-rebuild recovery approach works, and what it can and can't fix.
A PDF that refuses to open is one of the more frustrating file problems — there’s no obvious error to fix, just a reader saying it can’t read the file. Before giving up on it entirely, it’s worth trying a recovery pass, since a lot of “corrupted” PDFs are only partially damaged.
Why PDFs become unreadable
PDF readers vary a lot in how strict they are about the file format. Common causes of a “corrupted” PDF include an interrupted download or transfer, a bug in the software that created it, a truncated file, or a reader that’s simply pickier than others about minor spec violations. In many of these cases, the underlying content is largely intact — it’s the file’s structure or metadata that’s the problem, not the actual pages.
How the recovery approach works
The Repair PDF tool takes advantage of the fact that different PDF parsers have different tolerance for damage:
- It tries to open your file with a lenient, browser-based parser (pdfjs) that’s often able to read PDFs that stricter readers reject outright.
- If it opens successfully, every page it can still read is rendered as an image.
- A brand-new, well-formed PDF is rebuilt from those rendered pages, using a completely clean internal structure.
The result is a PDF that opens reliably everywhere, built from everything the lenient parser could still make sense of in the original file.
What this can’t fix
This is best-effort recovery, not magic. If the file is too badly damaged for even a lenient parser to open — a severely truncated download, a file that isn’t really a PDF at all, or data corrupted at a low level — you’ll get a clear message rather than a fake success. And because the rebuilt PDF is made of rendered page images, the recovered file won’t have selectable or searchable text, even though it will look right and print correctly.
Before you try repair
- If you have another copy of the file (a different download, an email attachment, cloud backup), try that first — it may simply not be corrupted.
- Try opening it in a different PDF reader or browser tab, since tolerance for spec violations varies.
- If neither works, run it through the repair tool as a next step.
A note on privacy
The repair attempt — parsing, rendering, and rebuilding — happens entirely in your browser. Your file is never uploaded to a server, even while it’s being recovered.