Repair a Damaged PDF

Find out why a PDF will not open and try to recover it. The file is checked for structural damage, rebuilt from the objects that are still readable, and test-rendered page by page. You get a clear result: repaired, not damaged, or not recoverable.

Drag & drop a damaged PDF here

or choose a file from your device

PDF (damaged files welcome)

Overview

What is Repair PDF?

Repair PDF works out why a PDF will not open and tries to rebuild it from the parts that are still readable. It then tells you plainly what happened: the file was repaired, it was not damaged in the first place, or it cannot be recovered.

A PDF is a collection of numbered objects: pages, fonts, images and text. Near the end of the file sits an index called the cross-reference table, which says where each object starts. When that index is wrong or missing, readers report the file as damaged, even though most of the content is often still there. Interrupted downloads, broken email gateways and buggy export tools are common causes.

How it works

How to repair a damaged PDF

  1. Choose the file

    Any file can be chosen, even one with a wrong name or type.

  2. Inspection

    The raw bytes are checked for the header, end marker, index, trailer, page tree and cut-off data.

  3. Recovery

    Every readable object is collected and a new file is written. Each page is then test-rendered.

  4. Result

    Preview the recovered pages and download the repaired PDF.

Examples

Examples: which damage can be repaired

Each type below is covered by automated tests on deliberately damaged files.

Problem Typical cause Result
Wrong startxref offset File edited by a tool that did not update the index Repaired, all pages
Corrupted cross-reference table Line-ending conversion, bad FTP transfer Repaired, all pages
Junk before the %PDF header Saved with email or HTTP headers attached Repaired, all pages
Missing trailer and index Writer crashed before finishing Repaired, all pages whose objects are present
Broken page tree Faulty merge or split tool Repaired from the page objects found
Truncated file Interrupted download Partial: the pages before the cut are recovered and the rest are reported missing
Not a PDF at all, or encrypted Wrong file, or a password-protected PDF Not repairable; the reason is shown

Honest results

When the tool says "no damage found"

If the structure is intact and every page renders, the tool does not create a "repaired" copy. Saving the same file again would not fix anything, and calling it a repair would be misleading.

A file that is intact but still misbehaves in one program usually has a different problem: an unsupported feature, a font that program lacks, or a password. Try another reader, or the matching tool. Use PDF Unlocker for passwords and PDF Compressor for very large files.

Inspection
no structural issues
Render test
12 / 12 pages OK
Result
Not damaged, no new file

Use cases

Use cases

Interrupted downloads

A large report stopped downloading at 80%. The pages that arrived can usually be recovered while you get a fresh copy.

report.pdf (cut off) 18 of 22 pages

"File is damaged and could not be repaired"

The exact message some readers show when only the index is broken. Rebuilding the index is often all that is needed.

bad xref new xref

Output from old or buggy software

Some legacy systems write slightly invalid PDFs that strict readers reject. A rebuilt file is clean and standard.

opens in A, fails in B opens in both

Under the hood

What "rebuilding" means

Instead of trusting the file's index, the tool reads the file from start to end and collects every complete object it finds. Pages are then put in order from the page tree, or straight from the page objects if the tree itself is broken. The tool writes a brand-new file with a correct index and trailer, and checks every page by drawing it.

Tips

Tips

  • Always try a fresh copy from the sender or the source first. A complete original beats any repair.
  • Check the recovered pages in the preview before relying on the repaired file.
  • If pages are reported missing, the data was not in the file, and no repair tool can bring it back.

Limitations

Limitations

Missing data stays missing

Content that is not in the file, such as the end of a truncated download, cannot be recreated.

Damaged content streams

If the data inside a page or image is corrupted, that page is left out and listed. It is not shown half-broken.

Encrypted files

Password-protected PDFs cannot be rebuilt here. Unlock them first.

Document extras

The rebuilt file keeps pages and their content. Bookmarks, form logic and signatures may not survive.

Privacy

Privacy

Inspection and recovery run in your browser. The damaged file is not uploaded to TryFormatter.

Related tools

Related tools

Frequently Asked Questions

Can every corrupted PDF be repaired?

No. Damage to the file structure (index, trailer, page tree, stray bytes) can usually be fixed. Data that is missing, such as the end of a cut-off download or a corrupted image stream, cannot be recreated. The result tells you which pages were recovered and which were not.

The tool says my file is not damaged, but it still will not open. Why?

The structure is intact and every page renders here, so the problem is elsewhere. It might be a password, a feature your reader does not support, or a reader problem. Try another PDF reader, or PDF Unlocker if the file asks for a password.

Will the repaired PDF look the same as the original?

Recovered pages keep their original content: text, fonts and images are copied as they are. Pages whose content could not be rendered are left out and listed, rather than shown broken.

Why can it not repair a password-protected PDF?

Encrypted objects cannot be read or rewritten without the key. Remove the password with PDF Unlocker first, using the password you have, then repair the unlocked file if it is still damaged.