Why do PDF files get corrupted?
PDF corruption happens more often than most people expect. Common causes: interrupted downloads (browser crash or network drop mid-transfer), storage device failure, email attachment encoding errors, incomplete saves when an application crashed, and file system errors after an improper shutdown. The result: a PDF that Adobe Reader, Chrome, or any viewer refuses to open.
How to repair a corrupted PDF free online — step by step
- Open ihatepdf.cv/repair-pdf in your browser — no sign-up required
- Drag and drop the damaged PDF onto the upload area
- Click Scan & Repair PDF
- Watch the forensic analysis and repair log in real time
- If recovery succeeds, click Download Repaired PDF — no watermark
The entire process runs locally in your browser. Your file is never uploaded anywhere.
The 5 repair strategies — explained
- Strategy 1 — Direct structural repair: Loads the PDF through pdf-lib's error-tolerant parser and immediately re-saves. Fixes many minor corruption issues.
- Strategy 2 — Stream length normalization: Scans every content stream, measures actual byte length, and corrects declared lengths that don't match.
- Strategy 3 — Manual xref reconstruction: Scans the raw binary for every object definition, builds a brand-new cross-reference table from scratch.
- Strategy 4 — Truncation recovery: Strips everything after the last valid endobj marker, then rebuilds the xref from surviving object data.
- Strategy 5 — Page-by-page salvage: Attempts to copy each page individually into a new document, skipping pages that throw errors.
After repair — stabilize the file
After a successful repair, consider using Flatten PDF to merge all page content into a clean static structure, which prevents future corruption from interactive layer issues. Then run Compress PDF to optimize the file size of the repaired document.
What to try before you repair
Sometimes the PDF is fine and the problem is elsewhere — worth two minutes before repairing. Re-download the file in case the first transfer was interrupted, and try opening it in a different viewer (Chrome, Firefox, and Adobe Reader each tolerate different flaws). If you have it in cloud storage, check the version history — Google Drive, Dropbox, and OneDrive all keep earlier copies you can restore. If the file still refuses to open everywhere, it is genuinely damaged, and the repair tool is the next step.
Recovering text when full repair isn't possible
Even when a PDF is too damaged to rebuild into a working file, the words inside it are often still recoverable. After running the repair, try Extract Text on the result to pull out whatever readable content survived — frequently enough to reconstruct a contract, report, or letter in a new document. The page-by-page salvage strategy is designed exactly for this: rescuing the good pages even when a few are beyond saving.
Frequently asked questions
Can a password-protected PDF be repaired?
Remove the protection first with Remove Password (you will need the password), then run the repair. Encryption otherwise prevents the tool from reading the damaged structure.
Will repair recover images and formatting, or just text?
When structural repair succeeds, the full document — images, formatting, and layout — is restored. Only in severe truncation cases does the tool fall back to salvaging individual pages or recoverable text.
What if all 5 strategies fail?
The file either was never a valid PDF, suffered catastrophic storage failure with no recoverable PDF objects, or was a zero-byte fragment. Contact whoever sent the file to request a fresh copy, or check cloud storage version history (Google Drive, Dropbox, OneDrive all keep file versions).
Is there a file size limit?
No server limit — the constraint is your device memory. Files up to 150MB work reliably on most desktop browsers.
Does the repaired file have a watermark?
No. ihatepdf never adds watermarks to any output file.