Skip to main content

Repair PDF

Try to recover a PDF with damaged internal structures without uploading the file.

  • Export
Automate

Embed this widget

Customize the result, check the live preview, then copy the code.

Preview

Embed code type

Code to copy

Responsive and automatically resized by Bethemesh.

Your files are processed locally in your browser and are never sent to our servers.

Drop your file here

Recommended size: up to 100 MB

Was this tool useful?

How does this tool work?

Repairing a PDF tries to make a file usable again when it will not open, shows a structure error or crashes other tools: an interrupted download, a damaged attachment, a faulty export from some software. The tool rebuilds the document’s internal structure from what is still readable and produces a clean new file. Everything happens in your browser, without uploading the document.

A PDF contains a cross-reference table that says where each object (page, font, image) sits in the file. When this table is wrong or missing, many readers give up. The qpdf engine, running as WebAssembly in the page, then goes through the file object by object, rebuilds the table and writes a consistent document.

This method fixes the most common cases: offsets broken by a clumsy edit, a corrupted cross-reference table, a missing end of file when the objects themselves are intact. The repaired file is downloaded as pdf-repare.pdf.

It cannot recreate what no longer exists: if a truncated file has lost its last pages or an image is damaged, those parts stay missing or incomplete. If repair fails, the file is too damaged to be rebuilt this way.

How to use this tool

  1. Import the damaged PDF

    Choose the file that will not open or shows an error; keep a copy of it.

  2. Run the repair

    The engine analyses the file and rebuilds its internal structure.

  3. Download and check

    Open the repaired file and go through every page to spot anything missing.

Use cases

Recover a damaged attachment

Reopen a PDF received by email that your reader reports as damaged.

Unblock a process

Repair a document that merging, compression or another tool refuses to load.

Rescue a faulty export

Fix a PDF produced by software or a virtual printer that writes an incorrect structure.

Examples

Corrupted cross-reference table

The page objects were intact: by finding them one by one, qpdf rebuilds a correct table. A file cut off mid-transfer, on the other hand, would only get back the pages that were fully received.

Input

4-page quote.pdf whose cross-reference table was damaged during a transfer; the reader shows an error

Result

Repaired 4-page PDF that opens normally

Tips and best practices

  • First try downloading the file again from its source: it is often the most reliable fix.
  • Keep the damaged original: another specialised tool might recover more from it.
  • After repair, check the page count with Analyze PDF information.

Frequently asked questions

Can every damaged PDF be repaired?

No. The tool fixes structural problems; content that is truly lost (a cut-off end of file, erased data) cannot be recreated.

Does repair change page content?

No. Recovered objects are written back as they are; only the file’s internal organisation is rebuilt.

What if repair fails?

Download the file again or ask the sender for a new copy. A badly damaged file no longer holds enough information to be rebuilt.

Can I repair a password-protected PDF?

Repair works on the structure; if the document is encrypted, unlock it first with its password so you can work on it afterwards.

Can I use repair in a Pipeline?

Yes. As a first step, it makes the following operations more reliable on files of uneven quality.

Is the damaged file sent for analysis?

No. The rebuild is done in your browser by qpdf compiled to WebAssembly.

Related tools

Tools similar or complementary to this one.

Works well with

Inspect pages, size, version, metadata, forms, annotations and active elements in a PDF.

PDF & documentsUse this tool

Remove PDF password protection locally when you know the current password.

PDF & documentsUse this tool

Reduce PDF file size locally with lossless optimization or stronger visual compression.

PDF & documentsFeaturedUse this tool
TutorialBest practicesBeginner

How to securely redact a PDF before sharing it

Learn why covering text is not enough, how secure PDF redaction removes sensitive information and why sanitization matters before sharing.

10 September 20262 min
GuideBest practicesBeginner

How to clean and OCR a scanned PDF

Clean a scanned PDF before OCR to remove unnecessary pages and create a more useful searchable document.

6 September 20262 min