Your country

Tools that support it use your country for local currency, number formats, units and paper size. Your choice is saved only in this browser.

Type a name or a two-letter code. Use the up and down arrow keys to move through the countries, Enter to choose one and Escape to close.

Repair PDF

Rescue a PDF that won’t open — and see exactly what was wrong with it.

PDF No upload Free, no sign-up

Next steps

About the Repair PDF

Repair a PDF that won’t open or shows errors such as “The file is damaged and could not be repaired”. The tool checks the file with qpdf, a strict PDF checker, then rebuilds it with pdf-lib, which reads the file object by object instead of trusting its damaged index. That fixes broken cross-reference tables, wrong stream lengths, junk before the PDF header and broken page lists, and recovers everything up to the cut in a download that stopped halfway. Finally pdf.js draws every page of the result and compares it with what it can still read in the original; a page whose content can’t be kept is saved as an image of what pdf.js draws, as a last resort.

You get a report in plain language: what was wrong, what was fixed, which pages are complete and which parts are missing. Missing data is never invented — a page that isn’t in the file stays missing, and you are told so. Everything runs in your browser; the file is not uploaded.

How to use it

  1. Choose the damaged file (or drag it onto the box). Any file is accepted — damaged PDFs sometimes lose their name or type.
  2. Wait while it is checked, rebuilt and verified page by page. Large files take a little longer.
  3. Read the report: what was wrong, what was done and how many pages were recovered.
  4. Press Download repaired PDF. If some pages were saved as images and you need their text, run the file through OCR PDF.

Examples

“There was an error opening this document”
Input
A 24-page report whose cross-reference table points to the wrong places after a faulty save
Result
Rebuilt: a new cross-reference table, all 24 pages with their text and graphics; qpdf finds no errors in the result
A download that stopped at 70%
Input
A statement whose file ends in the middle of page 9 of 12
Result
Partly recovered: pages 1–8 complete; the report says the file declares 12 pages and that the rest is not in the file
A “PDF” that is really a web page
Input
invoice.pdf that a portal sent as an HTML error page
Result
Identified as HTML, not a PDF, with the advice to download it again

Common uses

  • Opening a PDF that Adobe Acrobat, Preview or another reader says is damaged.
  • Saving what can be saved from an interrupted download, a failed copy or a bad email attachment.
  • Cleaning up a PDF that opens in one program but not in another, stricter one.
  • Finding out whether a file is damaged at all — or not a PDF in the first place.

What goes wrong inside a PDF

A PDF is a header (“%PDF-1.7”), a series of numbered objects (pages, fonts, images, text), a cross-reference table listing where each object starts, and a trailer pointing to the document’s root (ISO 32000-1 §7.5). Readers jump straight to objects through that table, so when it points to the wrong bytes — after a faulty save, an edit that changed the length of the file, or line endings converted by an email or FTP program — the whole file seems broken even though every page is still inside.

  • Broken cross-reference table — rebuilt by reading the objects one by one.
  • Wrong stream lengths — the real end of each data stream is found and the length corrected.
  • Extra bytes before the header — removed.
  • Damaged page list or missing root — rebuilt from the page objects that exist; inherited page sizes and resources are kept.
  • Cut-off file — read up to its last complete object; the report says what is missing.

How the repair is checked

qpdf checks the original and the repaired file (it reads only structurally sound files, so “qpdf finds no errors in the repaired file” is a strict test). pdf.js then draws every page of the repaired file and, when the original was damaged, every page of the original too, and compares how much is drawn. When the rebuilt page shows clearly less than pdf.js could still read from the original, or can’t be drawn at all, the page is replaced by an image of the original page at 150 DPI. Images are used only as a last resort, because their text can’t be selected or searched.

What can’t be repaired

Repair can only bring back what is still in the file. When a download stopped early, the pages after the cut were never received; when a disk or sync error overwrote part of a file with zeros, that part is gone. Compressed data that is scrambled inside a page stays scrambled: readers show as much of that page as can be decoded. In those cases, the best fix is an earlier copy or a fresh download.

Sources

  • ISO 32000-1:2008, §7.5 — file structure: header, body, cross-reference table and trailer; §7.3.10 — a reference to an object that doesn’t exist is treated as the null object.
  • qpdf manual — the --check option, which checks a file’s structure and decodes its streams.

Limitations

  • Data that isn’t in the file any more (the rest of an interrupted download, zeroed-out parts) can’t be recovered — and is never made up.
  • Encrypted files are only checked and rewritten by qpdf, with their protection kept; an encrypted file that is badly damaged can’t be repaired here.
  • Pages saved as images look right but their text can’t be selected; run OCR PDF to add a text layer.
  • Rewriting a file invalidates its digital signatures, so keep the original if you need to prove them.
  • Very large files need a lot of memory; on a phone, close other tabs first or use a computer.
  • The first use downloads the PDF engines once (qpdf alone is about 1.3 MB), so it needs an internet connection.

Privacy

Everything happens in your browser. What you enter or open here is not uploaded or stored by MySmartCoPilot.

Frequently asked questions

Is my file uploaded?

No. The file is checked, rebuilt and verified by your browser on your device. Nothing is sent to MySmartCoPilot or anyone else.

Can every damaged PDF be repaired?

No tool can restore data that isn’t in the file. When the damage is in the file’s index or structure — the most common case — everything comes back. When part of the file is missing or overwritten, the report lists what could be recovered and what is lost.

My PDF opens in the browser but not in Acrobat. Why?

Browser PDF engines are very forgiving and quietly work around damage that stricter programs refuse. The repaired copy is written cleanly — with a correct cross-reference table and stream lengths — so strict programs open it too.

Why were some pages saved as images?

Their content couldn’t be copied into the repaired file, but pdf.js could still draw them from the original. An image is the only faithful way to keep what is visible on such a page. Use OCR PDF if you need to search or copy their text.

It says “No damage found”, but my file still won’t open somewhere. What now?

The file’s structure is sound, so the problem is likely a feature that program doesn’t support — for example an XFA form made with Adobe LiveCycle, or a newer kind of encryption. The re-saved copy sometimes helps; otherwise open the file in another reader.

Why does it say my file is a web page?

Some websites send an error or login page when a download fails, and your browser saves it with the name you expected. Open the link again (logged in, if needed) and download the PDF once more.

Quick answers and tool search

Type to search tools or to get a quick answer, for example 18% of 2500. Use the up and down arrow keys to move through the results, Enter to choose, and Escape to close.