← Back to Blog

How to Repair a Corrupted PDF (and What to Do When It Won't Open)

A PDF that will not open is rarely gone for good. In most cases the content is still inside the file — what broke is the index that tells a reader where each piece lives. Repair rebuilds that index, and the document opens again.

Here is how to tell what went wrong, how to fix the common cases, and when to stop trying.

First, identify the failure

Five symptoms cover almost everything:

  • "The file is damaged and could not be repaired" — the cross-reference table is broken. This is the most fixable case.
  • "Cannot open — invalid format" — the download was cut short, or the file is not actually a PDF (a renamed .docx, or an HTML error page saved as .pdf).
  • Opens, but pages are blank or garbled — the content streams are damaged, or the fonts they reference are missing.
  • Opens in one reader, fails in another — the file uses a feature the stricter reader rejects. This is not corruption, it is incompatibility.
  • Opens, but the page count or file size looks wrong — truncated file, usually from an interrupted transfer.

The first and last cases are the ones a repair tool can fix. If every reader refuses the file and the size is suspiciously round (exactly 0 KB, or far smaller than you expect), check that the download actually completed before assuming corruption.

Step by step: repair a PDF

  1. Open the Repair PDF tool.
  2. Upload the damaged file.
  3. Run the repair and download the rebuilt document.
  4. Open the result in two different readers before you rely on it.
  5. Compare the page count and the last page against what you expect.

Step 5 matters more than it sounds. A repair can succeed structurally while silently dropping a damaged page. Check the end of the document, not just the beginning.

What repair actually does

A PDF is a container: objects, plus a cross-reference table listing where each object sits in the file. Repair works at that container level:

  • Rebuilds a broken or missing cross-reference table
  • Reconstructs the object tree from the raw streams still present
  • Fixes malformed or truncated object entries
  • Rewrites the trailer so readers can find the document catalog

What it cannot do: recover content that is no longer in the file. If a page's data was overwritten or never transferred, no tool can invent it. Repair restores access to what survived, not what was lost.

When the file will not open at all

Try these before giving up:

  • Unlock it first. A password-protected PDF fails with a generic "damaged" error in many readers. If you own the file and know the password, run it through the Decrypt PDF tool, then repair the unlocked copy.
  • Re-download from the source. Email attachments truncate; a 40 MB file arriving as 12 MB is a transfer problem, not corruption. Download again over a stable connection.
  • Check you have a PDF. Open it in a plain text editor. A valid PDF starts with %PDF-. If you see <!DOCTYPE html> or PK, you have an error page or a renamed Office file — convert the original instead.
  • Ask for a re-export. If the file came from someone else, an export from the source application is faster and cleaner than repairing a damaged copy.

How files get damaged in the first place

Almost all corruption comes from four places:

  • Interrupted transfer — the most common cause. Partial writes leave a broken index.
  • A crash mid-save — the application wrote content but never finished the index.
  • A full disk — the write stopped halfway with no error shown.
  • Bad exports from generator libraries — some produce files that only lenient readers accept.

There is nothing you can do about files other people send you. For your own files: save to local disk, then move or upload, rather than writing directly across a network path.

After repair: make the file safer to handle

A repaired document still has whatever structure it had before. Two cheap follow-ups:

  • Shrink it — repaired files often carry orphaned objects. Running Compress PDF cleans up most of the dead weight.
  • Lock it — if the document is confidential, add a password with Encrypt PDF so a future transfer failure is not also a disclosure.

Related guides

FAQ

Can a repaired PDF lose pages? It can. Repair recovers what is structurally readable; a page whose data is genuinely gone cannot come back. Always check the page count and the final page.

Is it safe to upload a damaged PDF to an online tool? Treat any upload as a disclosure decision. For contracts, medical records, or ID documents, prefer a tool that deletes files after processing — ours removes the upload once the job finishes. For extremely sensitive files, use offline software.

Does repair work on password-protected files? Only after unlocking. Decrypt the file first, then repair.

Can I repair a PDF on my phone? Yes, if the tool runs in a browser. Upload from the phone's file picker; there is no install.

Will repair fix a PDF that opens but shows garbled text? Usually not. Garbled text is a font or encoding problem inside the content stream, not a structural one. Re-exporting from the source application is the reliable fix.

Open the Repair PDF tool and try it on the file — if the content is still in there, the repair will find it.

Part of Edit & Reorganize PDF — Guides & Tools — browse more guides and tools on this topic.
Ready to try it? Open the tool and convert your file in seconds.Open the tool →

Sources & further reading