Repair PDF

Rescue PDFs broken by interrupted downloads, email problems or faulty software, and see exactly what was recovered.

Runs in your browser: your file is not uploaded.

What can be fixed

qpdf rebuilds broken cross-reference tables and file structure, which fixes many PDFs that fail to open after interrupted downloads or email corruption. It also skips junk added before the start of the file and measures content again when its recorded length is wrong. Files that are truncated badly or are not really PDFs cannot be fully recovered.

How to repair a PDF

  1. Choose the damaged PDF (up to 100 MB).
  2. Press Repair PDF. The file is read object by object, the index of objects is rebuilt, and a fresh copy is written.
  3. Read the report: the pages recovered, what was fixed and anything that couldn't be recovered. Technical details show qpdf's own messages.
  4. Download the copy ending in -repaired.pdf.

How the check works

A PDF ends with an index (the cross-reference table) that says where each page, font and picture starts. When a download stops early or a program saves the file badly, that index points to the wrong places and readers give up. qpdf ignores the broken index, scans the whole file for its objects and writes a new, consistent file. Repaired files up to 30 MB are then checked again with qpdf's own checker, which decodes every stream, so the report also flags content that is corrupt rather than just misplaced.

Example

In our tests, a 5-page report with a broken index came back with all 5 pages and the message "Repaired". The same report cut off at 40% of its size, like a failed download, came back as "Recovery incomplete: 1 of 5 pages recovered": the first page was intact and the other four were in the missing part of the file.

Tips

  • Keep the damaged original: if a fresh download becomes possible later, it is the better fix.
  • A PDF that is fine but too big to email doesn't need repairing; use Compress PDF.
  • If only some pages matter, repair the file, then keep those pages with Split PDF.

Uses qpdf 12.2.0 (Apache License 2.0), compiled to WebAssembly with zlib and libjpeg-turbo and served from this site, so it runs in your browser. This software is based in part on the work of the Independent JPEG Group. Licence notices.

Frequently asked questions

Will the content change?

No. Only the file's structure is rebuilt; pages, text and pictures that can be read are kept exactly as they were. Parts that are missing from the file can't be invented, and the report lists them.

What does "Recovery incomplete" mean?

Part of the file is missing or unreadable, usually because a download or copy stopped early. You get every page that could be read; the report says how many pages or parts were lost.

It still won't open. What next?

Download the file again from the original source, or ask the sender for a new copy. If only one app refuses it, try another PDF reader.

Is my PDF uploaded?

No. The repair runs in your browser with qpdf compiled to WebAssembly, so the file never leaves your device.

Can it repair password-protected PDFs?

Yes. Enter the password when asked; the repaired copy keeps the same password.

More PDF tools

See all PDF tools →

Can't find the tool you need? Tell us, and the most requested tools get built first.