Repair a damaged PDF
A partial-recovery pass for damaged PDFs: re-parses the file with tolerant settings and re-saves a clean copy.
Drop your file here
or click to browse
How it works
A partial-recovery pass for damaged PDFs: re-parses the file with tolerant settings and re-saves a clean copy.
When a PDF won't open, the cause is usually a bad xref table, malformed objects, or a truncated download. The tool loads the file via pdf-lib with throwOnInvalidObject set to false and ignoreEncryption set to true, then re-saves with useObjectStreams: false (which writes a simpler, more compatible file structure). For files that are just slightly broken (often the case for downloads that failed mid-stream or PDFs generated by a buggy library), this is enough to get back a working document. For files that are genuinely destroyed (truncated to 10% of original, garbage content, etc.), the tool will fail with an honest error. Output filename has -repaired appended. The result may be larger than the input because object streams are unpacked.
How to use it
- Drop the broken PDF. Truncated downloads and files with bad xref tables are the best candidates.
- Run the repair. The file is re-parsed locally with tolerant settings and rebuilt with a simpler structure.
- Download the repaired copy. If the file was salvageable, the -repaired PDF downloads; truly destroyed files return an honest error.
Frequently asked questions
- Can this recover any corrupt PDF?
- No. It can fix files with minor structural issues (bad xref, malformed objects). Truly destroyed files (large truncations, corrupted page content) are beyond what client-side tools can do.
- Will the repaired PDF be the same as the original?
- If the original was salvageable, the page content is preserved. The internal structure is rebuilt, so file size and object layout may differ.
- Is the file uploaded for repair?
- No. Repair runs locally via pdf-lib in your browser.
- Why is the repaired file larger?
- The repair re-saves without object streams (a compression scheme used by modern PDFs). Trading a bit of size for maximum compatibility.