Repair PDF
Fix a PDF that will not open or shows errors. The file is rebuilt, damaged pages are recovered as far as possible, and you see exactly what was repaired.
About PDF repair
A PDF is more than a list of pages: at its end sits a cross-reference table that tells a reader where every part of the file starts. When a download stops early, a disk sector fails or a program writes the file badly, that table or the data it points to breaks, and readers refuse to open the file or show blank pages.
The repair runs in two steps. First, qpdf reads the file in recovery mode: it scans the whole file for objects, rebuilds the cross-reference table, fixes wrong stream lengths and the page tree, and recovers page content that is only partly damaged. If the file is too broken for that, Ghostscript reads whatever it can still interpret and writes a completely new PDF. The result tells you which strategy worked, how many pages were found before and after, and every fix that was made.
A repair cannot bring back data that is no longer in the file. If a page was cut off, the readable part is kept and the result says so. A file that contains no PDF data at all cannot be repaired; in that case try another copy of the file.
Was this tool useful?
Thanks for your feedback!
Could not send your feedback. Please try again later.
Frequently Asked Questions
Upload the PDF and click Repair PDF. The file is rebuilt and downloaded automatically, and the page lists what was found and fixed, for example a rebuilt cross-reference table or a damaged page.
Broken or missing cross-reference tables (the index that tells readers where each part of the file is), wrong stream lengths, a damaged page tree, missing trailers and files cut off during download. Damaged page content is recovered as far as it can still be read.
They are the two repair strategies. qpdf repairs the file structure and keeps everything it can, including form fields and bookmarks. If qpdf cannot open the file at all, Ghostscript reads what it can and writes a completely new PDF; in that case interactive parts such as form fields may be lost.
No. If the file contains no readable PDF data, for example because only the first few kilobytes were downloaded or it is a different file type with a .pdf name, there is nothing left to recover and the tool tells you so. Try another copy of the file in that case.
Not if a password is needed to open the file. Remove the password first with the Remove Password tool, then repair the copy.
No. The PDF is only kept while it is being repaired and is deleted automatically afterwards.
Related Tools
All PDF Tools →Flatten PDF
Turn fillable form fields, comments and stamps into plain pa...
PDF to PDF/A Converter
Convert a PDF to PDF/A-2b (or 1b / 3b) for long-term archivi...
PDF to JPG Converter
Convert each page of a PDF into high-quality JPG files.
Date Calculator
Add or subtract days, weeks, months, and years. Calculate da...
Unix Timestamp Converter
Convert Unix epoch timestamps to human-readable dates and ba...
Online Code Editor
Write and edit HTML, CSS and JavaScript in the browser with...