Skip to content
ALL PDF TOOLS37
QPDFTOOL 103 OF 190

Repair a Damaged PDF — Free Online Tool

Rebuild a PDF whose cross-reference table is damaged — and find out plainly when there was nothing to fix.

ENGINEQPDF
ACCEPTSPDF
MAX SIZENONE
UPLOADNEVER
01Upload the damaged PDF by dragging it into the drop zone or clicking to browse.
02Click Repair PDF — there is nothing to configure, because qpdf re-parses the file and writes a fresh one with a rebuilt cross-reference table.
03Download the repaired file, and read the warnings it reports: a file that had to be reconstructed is not the same as one that was fine all along.

About Repair PDF

A PDF is a pile of objects plus a table saying where in the file each one lives. When a download is interrupted, a program crashes mid-save, or something writes the file with its arithmetic wrong, that table stops matching the objects and readers start refusing the document — sometimes with a message about a damaged file, sometimes by opening a blank page. This tool hands the file to qpdf, compiled to WebAssembly and run in your tab. qpdf parses it, hunts down the objects by scanning the file when the table cannot be trusted, and writes out a fresh document with a rebuilt cross-reference table. There is nothing to configure, because the rewrite is the repair. Now be exact about the scope, because the word repair invites far more than this can do. What gets rebuilt is the index, not the contents. Objects that are genuinely not in the file cannot be reconstructed from a file that does not contain them, so a download that stopped halfway comes back as far as it got, at best. A file with no trailer dictionary, or one that never carried a PDF header at all, gives qpdf nothing to start from and it says so instead of handing you something. It does not undelete pages, recover text somebody removed, or reverse an edit. It is not a virus scanner and not a converter: a file that is not a PDF is reported as a file that is not a PDF. The most useful thing this page does is tell you the truth about your file afterwards. qpdf distinguishes between reading a document cleanly and having to reconstruct parts of it, and it reports each thing it worked around — a recovered object stream, a bad offset, an object it had to go looking for. Those warnings are shown rather than swallowed, so a file that had to be rebuilt is never presented as one that was fine all along, and when there was nothing to warn about the tool says the structure was already sound rather than claiming a rescue. Nothing is uploaded, which matters here more than most: a document too broken to open is exactly the kind you should not be handing to a stranger's server.

Questions

What does 'repair' actually mean here?

A PDF stores its objects and, separately, a table saying where in the file each one lives. When that table stops matching the file — an interrupted download, a crash mid-save, a producer that miscounted — readers refuse the document. qpdf re-parses the file, finds the objects by scanning when the table cannot be trusted, and writes a fresh document with the table rebuilt. What is repaired is the index, not the contents.

Can it recover a file that will not open at all?

Sometimes, and it will tell you which case you are in. If the objects are present but the map to them is wrong, that is exactly what this fixes. If the file has no trailer dictionary, or never carried a PDF header, qpdf has nothing to start from and says so rather than producing a file. A download that stopped halfway is missing bytes, and no tool can invent the part that never arrived.

Why did it say the file completed with warnings and still give me a document?

Because that is the successful outcome, not a failure. qpdf reports warnings when it had to reconstruct something rather than reading it cleanly — a bad offset, an object it had to hunt for, a recovered stream — and the file it writes in that case is complete and valid. The warnings are shown rather than swallowed, because a document that had to be rebuilt is not the same as one that was fine all along.

It said nothing was wrong. Did the tool do anything?

It re-wrote the file, and it found nothing to work around while doing it — so it says that instead of claiming a rescue. A rewrite on its own can still be useful: the result is a cleanly serialised document with a fresh cross-reference table. But if you came here because a reader called your file damaged and this page found no damage, the problem is somewhere else, and being told that is more useful than a reassuring green tick.

Can it get back pages or text that were deleted?

No. This reconstructs the map of where objects are in the file; it cannot restore objects the file does not contain. Deleted pages, removed text and reversed edits are gone from the bytes, and nothing here goes looking for them. It is also not a converter or a scanner — a file that is not a PDF is reported as a file that is not a PDF.

Is my file uploaded to a server?

No. Transmute processes everything locally in your browser using JavaScript and WebAssembly. Your files never leave your device — there is no server, no upload, no cloud processing.

Related