Skip to content
GivenTool

Repair a damaged PDF

Rebuild a damaged PDF's structure with qpdf and pdf-lib, and see a report of what was fixed.

Loading tool…

A PDF that says "the file is damaged", opens with missing pages, or makes other tools fail usually has a broken index: the cross-reference table that tells a reader where every object in the file is. This is common after interrupted downloads, email gateways that alter attachments, or buggy export tools. The repair first runs the file through qpdf, the open-source PDF tool, which rewrites and normalises its structure. If qpdf stops at the damage, pdf-lib reads every object in the file in order and writes a fresh copy with a new index.

The result tells you what happened: which engine rebuilt the file, the problems it reported and how many pages the repaired file has, so you can check nothing is missing.

Repair recovers structure, not missing data: a file cut off halfway cannot get its missing pages back. Try downloading the file again first if you can.

How to use it

  1. Choose the damaged PDF.
  2. Click Repair PDF.
  3. Read the report and download the repaired file.
  4. Open it and check that every page is there.

Frequently asked questions

Are my files uploaded?

No. The first time you use the tool your browser downloads the processing engine from this site, like any other part of the page; your PDF itself is read and processed on your device and never sent anywhere.

What kind of damage can be fixed?

Broken or missing cross-reference tables, wrong object offsets, extra bytes before or after the file, and some malformed objects. Truncated files can often be opened, minus the missing part.

What cannot be fixed?

Content that is not in the file at all (a download that stopped halfway), encrypted files without the password, and files that are not really PDFs.

My PDF is password-protected

Unlock it with its password first using Unlock PDF, then repair the unlocked copy.

Will repairing change how the PDF looks?

No. Objects are copied as they are; only the file structure is rewritten.