Repair PDF
Recover data from damaged files.
Repair PDF runs on our secure server
- Encrypted upload
- Your file is uploaded directly to short-lived object storage over a pre-signed URL.
- Safety checks
- Each file is checked before any processor sees it: an empty file, a file whose type contradicts its name or this tool, or a PDF with no PDF header is refused. A damaged or truncated PDF is not refused for its damage — recovering it is what this tool does. Whether a malware scan runs as well is reported by the live server, and shows here once this page has heard from it.
- Processing
- A separate processing server — not this website — fetches your file from that storage and does the work.
- Download
- You get a signed, expiring link to the result — no account required.
- Auto-delete
- Inputs are wiped right after processing; outputs auto-delete within the retention window.
Checking our secure server…
About this tool
Attempt to repair a corrupted or unreadable PDF and recover as much content as possible.
Files are processed on a secure server, which deletes the upload when the job ends and serves the result for a limited time.
More details
Repair PDF passes a file that refuses to open, or opens with an error, through qpdf's parser and writer and hands back the rewritten copy. A "corrupted" PDF can still hold its pages while having lost the map to them: the cross-reference table that records where each object sits is damaged, or the file is cut off before its trailer. qpdf's documented behaviour when that table is broken is to rebuild it by scanning the file for the objects that remain.
The only structural check before qpdf runs is for a PDF header near the start of the file, so qpdf will still try a download that stopped partway and lost its end-of-file marker. If qpdf refuses the file outright, the job ends at once without a retry and says why: the PDF is password-protected and needs Unlock PDF first, or it could not be rebuilt into a PDF. If qpdf does not finish inside our server's time limit, or what it writes lacks a PDF header or an end-of-file marker, the run is retried, and if it keeps failing the job fails with no file. When qpdf recovers the document with warnings, they are shown next to the result.
This runs on a server. Your PDF, up to 100 MB, is uploaded over TLS to pdf.xyz's secure server, and the uploaded copy is deleted once the job is over. The repaired file's download link expires after 60 minutes; the stored bytes linger until the next pass of a once-a-day storage rule wipes them.
When to use it
An attachment your viewer calls damaged
A file clipped in transit, or saved by a program that crashed mid-write, can have a cross-reference table that no longer matches its contents. If the objects themselves are intact, a rebuilt table may be all it needs to open again.
A download that stopped early
An interrupted transfer leaves a PDF without its tail, end-of-file marker included. That marker is not required here, so the file still reaches qpdf; what qpdf can salvage is bounded by the bytes that made it across.
A file that opens in one app but not another
Forgiving readers quietly patch structural errors that stricter viewers, printers and upload portals reject. A freshly written structure gives those stricter programs less to object to.
Finding out what was wrong
When qpdf recovers a file with warnings, the result carries its own words about what it had to reconstruct, which tells you where to look when you compare the copy with what you expected.
How it works
1Add the damaged PDF
Drop one PDF onto the box reading "Add a PDF, or browse", or click it and choose the file; up to 100 MB, and there are no settings to choose. The box takes a file at once; nothing is sent until the status badge at the top of the panel reads Secure server and you press Repair on our secure server.
2Press Repair on our secure server
The file uploads and qpdf rewrites it. The button shows where the job is: Uploading your file…, then Waiting for our server… while it is queued, Repairing on our secure server… while qpdf runs, and Downloading the result… as the repaired copy is fetched into the page. A Cancel button under it stops the job while it runs. It stays busy until that copy is in the page, the job fails, or the browser stops waiting; then a note says our server is still on the job and offers Keep waiting, which picks up the same job rather than uploading the file again or starting a new one, or Cancel the job.
3Read the warnings, if any
If qpdf recovered the file with warnings, a notice headed This PDF was damaged and has been rebuilt sits above the download button with qpdf's messages: each repeated message once, no more than 10 of them, lines that would expose a server file path left out, and a final line noting that further messages were not shown whenever any were held back. No notice means no warning text came back from qpdf; it does not mean the file is guaranteed intact.
4Save the repaired copy
The button labelled Download followed by the file name saves the bytes the page already fetched, so saving does not depend on the link; invoice.pdf comes back as invoice-repaired.pdf. Our server's link to the stored copy expires after 60 minutes.
Common questions
Can every corrupted PDF be repaired?
No. qpdf can reconstruct a damaged or missing cross-reference table when the objects are still in the file, but it cannot bring back bytes that are not there. If qpdf refuses the file, the job stops straight away without a retry, saying either that the file could not be rebuilt into a PDF or that it is password-protected and needs Unlock PDF first. A run that goes past our server's time limit, or writes something without a PDF header and end-of-file marker, is tried again and then fails the job with no file produced.
Why was my file refused before the repair started?
Our server looks for the PDF header (%PDF-) near the start of the file. Without it the file is probably not a PDF at all, such as a renamed image or an HTML error page saved with a .pdf name, or it has lost its beginning, so no repair is attempted and the job is not retried.
What do the warnings after a repair mean?
They are qpdf's own messages from rebuilding the file, for example that the cross-reference table was damaged or an object was not where the file said. The repair still produced a PDF, but check those parts against the original.
Does repairing change how my pages look?
qpdf rewrites the file's structure without re-rendering pages, so nothing is turned into an image and selectable text stays selectable. It does not redraw or guess at content that was itself damaged, such as a corrupted image stream, and an object it could not find stays missing.
Can I repair a password-protected PDF?
Not one that asks for a password before it opens: there is no password field on this page, and qpdf cannot read such a file without one. If you have the password, take the file through Unlock PDF and repair the copy it gives back, bearing in mind that a badly damaged file may not get through Unlock PDF either.
Where does my file go, and for how long?
Over TLS to pdf.xyz's secure server. The uploaded file is removed once the job reaches its end, whether the repair worked or not; if a failed attempt is being retried, it is kept for that retry. The repaired copy's link works for 60 minutes and then returns an error, and a daily storage rule afterwards removes the stored file.
How large can my file be?
Up to 100 MB per file.
Which damaged files can Repair PDF take?
Any file that starts like a PDF, including one that is truncated or whose internal structure is broken: our server rewrites what it can read into a new, well-formed PDF. If what comes back is still not a readable PDF, the job fails and you get no file rather than a broken one. A file that does not start like a PDF is refused.
What does it mean when the repair lists warnings?
That the file was damaged and has been rebuilt. The repair succeeded, and the list under “This PDF was damaged and has been rebuilt.” names what had to be reconstructed, so you can check those parts against your original. A file that needed no reconstruction comes back without the list.
Related tools
All toolsGuides
All guidesNo sign-up required. Your files stay on your device until you run a tool.