🩹 File Recovery

Repair PDF

Fix a corrupted or damaged PDF that won't open properly.

Drop your damaged PDF here

or click to browse · Single PDF

Choose File

Repair PDF

Repair a corrupted or damaged PDF that won't open properly. Free and automatic — recovery happens on your device.

Stays in your browser

Processing runs on your own device. Your files are not uploaded to a server, so private documents stay private.

A PDF that will not open usually has a damaged file structure, often after an interrupted download or a failed email attachment. PDFly first rebuilds the cross-reference table that tells a reader where each page is; if that is not enough, it renders the pages it can still read and saves them as images. It cannot recover data that is missing from a cut-off file, and it cannot open encrypted files without the password.

How to repair a PDF online

  1. 1Drop your damaged PDF into the tool above, or click to browse your device.
  2. 2The repair process starts automatically — watch the progress bar as your file is rebuilt.
  3. 3Download the repaired PDF instantly. Everything runs in your browser — nothing is uploaded.

How PDFly repairs your PDF

PDF corruption happens in many ways — an interrupted download, a failed email attachment, or a software crash while saving. The most common failure is a broken cross-reference table, which tells a PDF reader where to find each page and object in the file.

PDFly's Repair tool works in two stages to recover as much content as possible:

  • Stage 1 — Structural rebuild: Using the pdf-lib library, the tool scans the file and rebuilds a clean cross-reference table. This fixes PDFs that won't open due to a broken file structure. Fonts, images, and text are preserved exactly as they were.
  • Stage 2 — Page-by-page recovery: If the structural rebuild fails, PDFly falls back to a more aggressive approach. It renders each page using pdf.js and recreates the document as a fresh PDF. This can recover content even when the file structure is too damaged to rebuild, but it converts pages to images, so text may no longer be selectable.

Both stages run entirely in your browser — no file data ever leaves your device.

What causes PDF corruption?

  • Interrupted downloads or transfers: The file was only partially saved, leaving the cross-reference table incomplete.
  • Software crashes: The application saving the PDF crashed before the file structure was fully written.
  • Email attachment corruption: Some email clients or servers can corrupt PDFs during transmission.
  • Storage errors: Bad sectors on a hard drive or USB stick can damage file integrity.
  • Overly aggressive compression: Some third-party tools produce malformed PDFs that don't follow the spec correctly.

What kinds of PDF damage can be fixed?

  • Broken cross-reference tables: The most common issue — fixed by Stage 1 (structural rebuild).
  • Missing or damaged page objects: If a page can still be rendered, Stage 2 can recover it as an image.
  • Invalid object references: The tool rebuilds the object table and discards unreachable data.

What can't be fixed?

  • Completely missing data: If the file was truncated (cut off mid-way), there's no data to recover beyond the point where the file ends.
  • Encrypted PDFs without the password: Repair can't decrypt protected files. Use Unlock PDF first if you know the password.
  • Zero-byte files: If the file size is 0 bytes, there's no data to repair.

Troubleshooting

  • The repair says "Couldn't repair this file": The file is too damaged for PDFly to recover any page data. Try re-downloading the file from the original source if possible.
  • The repaired PDF is missing some content: Pages that couldn't be rendered in Stage 2 are skipped. The tool recovers as many pages as it can.
  • The repaired PDF is much larger than the original: In Stage 2 recovery, pages are saved as images (JPG), which can increase file size. If you need a smaller file, use Compress PDF after repair.
  • Text isn't selectable in the repaired PDF: This happens when Stage 2 recovery was used — the content was recovered as images, not text. If selectable text is critical, try opening the original in a different PDF reader first.

Frequently asked questions

This tool rebuilds broken cross-reference tables and recovers pages when the file structure is corrupted, such as after an interrupted download or transfer. Stage 2 recovery can render and save pages as images even when the structure is too damaged to rebuild.
Severely corrupted files with missing page data can't always be fully recovered. PDFly attempts a fallback rebuild that reconstructs pages as images. If that also fails, the file likely doesn't contain enough recoverable data to restore.
No. PDFly's PDF Repair runs entirely in your browser using pdf-lib and pdf.js. Your file is read, repaired, and made available for download without ever being sent anywhere. Your data is never sent anywhere — everything happens locally in your browser.
You need to remove the password first with Unlock PDF. Repairing an encrypted file directly won't work because the content is scrambled without the correct password.
If Stage 1 (structural rebuild) is successful, yes — text remains selectable. If Stage 2 (image-based recovery) is used, the content is saved as page images, so text won't be selectable. This is a trade-off to recover the maximum amount of content.
If Stage 2 recovery was used, pages are saved as JPG images embedded in a fresh PDF. This can increase file size compared to the original. Use Compress PDF after repair if you need a smaller file.
There's no hard limit, but since repair runs in your browser's memory, very large files (several hundred MB) may be slow on phones or older computers. For Stage 2 recovery, extremely large files may cause the tab to freeze — a desktop browser will handle large PDFs more comfortably.