"There was an error opening this document." "The file is damaged and could not be repaired." Messages like these usually appear at the worst moment — just before a deadline, or when the only copy of a document is an email attachment. Often the pages themselves are fine and what's broken is the file's internal structure: the index that tells a PDF reader where each page and image lives.
The S-PDF repair PDF tool accepts files that other tools reject as damaged, rebuilds that structure and gives you a fresh, clean copy. For each file it tells you whether it was repaired or rebuilt, and how many pages were recovered.
How to repair a PDF file
- Upload the damaged PDF Drag the file onto the upload box or select it from your device. You can add several broken files to the same task.
- Start the repair The tool first tries a structural repair. If that isn't enough, it automatically falls back to rebuilding the file.
- Check the report Each file is marked repaired or rebuilt, with the number of pages recovered, so you can compare it with what you expected.
- Download and verify Download the fixed PDF (several files arrive as one ZIP) and open it in your usual reader to confirm everything is there.
Why use S-PDF for Repair PDF
- Opens rejected filesPDFs that other tools refuse as corrupted can still be uploaded and processed here.
- Content left untouchedThe first repair method rewrites only the file structure, not what is on your pages.
- Automatic fallbackIf a structural repair fails, the file is rebuilt by re-rendering it, with no extra steps for you.
- Honest resultsYou see per file whether it was repaired or rebuilt and how many pages came back.
- Several files at onceFix a whole batch of broken attachments in one task and download them as a ZIP.
- Private and temporaryFiles are deleted automatically one hour after your last action, or immediately on request.
Why PDF files get corrupted
Near the end of a PDF sits a cross-reference table: a list of byte positions that points the reader to every page, font and image in the file. If anything shifts those positions or cuts the file short, the reader can't find its way around and reports the document as damaged. Common causes include:
- a download or upload that was interrupted or finished incompletely;
- a USB stick removed or a laptop shut down while the file was being saved;
- email systems or old scripts that treated the PDF as text and altered some bytes;
- software that wrote an invalid file, or edited it without updating the index;
- sync conflicts in cloud storage folders.
How the repair works
Repair happens in two stages. First, qpdf scans the whole file, reconstructs a broken cross-reference table from the objects it finds, and writes out a clean new file structure. Your page content is not changed at all — this is the gentlest fix, and the report marks it as repaired.
If qpdf can't make sense of the file, Ghostscript takes over. It reads whatever it can interpret, re-renders the document and writes a brand-new PDF; the report marks this as rebuilt. A rebuild saves files that would otherwise be lost, but because the PDF is regenerated, compare the page count and look through the result, as unusual elements such as form fields may not come back exactly as before.
What can't be repaired
Repair can only restore what is still inside the file. If a download stopped after a few kilobytes, the missing pages simply aren't there to recover — the best fix is to download it again from the original email, website or cloud drive. Comparing the file size with what you expected is a quick way to spot a truncated file.
Password-protected PDFs are not damaged, just locked, and this tool won't remove passwords. If you know the password, use Unlock PDF instead. And if your repaired file turns out larger than you'd like, run it through Compress PDF afterwards.
Frequently asked questions
Is it free to repair a PDF?
Yes. The free plan covers 5 tasks a day with up to 10 files and 50 MB per task, without signup or watermark. Pro ($5 a month or $50 a year) raises this to 50 files and 500 MB per task, with unlimited tasks under fair use.
Will repairing change my document?
A structural repair only rewrites the internal file structure and leaves page content as it was. If the file has to be rebuilt instead, the PDF is regenerated, so check the result carefully.
What's the difference between repaired and rebuilt?
Repaired means the file structure was reconstructed and the original page content was kept as-is. Rebuilt means the structural repair failed, so the document was re-rendered into a new PDF from whatever could be read.
Why were fewer pages recovered than I expected?
Some pages were missing or too damaged to read. This often happens with files that were cut short during download. Getting a fresh copy from the original source is the most reliable fix.
Can you repair a PDF that is only a few kilobytes?
Usually not. A file truncated to almost nothing no longer contains the pages, so there is nothing to recover. Download it again from the sender or website.
Can this tool remove a PDF password?
No. A password-protected file is locked, not broken. If you know the password, use the Unlock PDF tool to remove it.
Are my files kept private?
Files are sent over HTTPS, kept in a private folder that isn't reachable from the web, never shared or used for anything else, and deleted automatically one hour after your last action. The Delete my files now button removes them straight away.
Last updated by The S-PDF team.