How to repair a corrupted PDF for free, without uploading it
Why PDFs break, what “repair” tools really rebuild, and how iLovePDF, Sejda, PDF2Go, PDF24, Repairit, qpdf, and Bytevive compare on limits, price, and privacy.
By the Bytevive team10 min read

You double-click a PDF and get “There was an error opening this document”, or a blank page, or a reader that simply gives up. Adobe’s own help page is blunt about it: if a PDF is corrupt, you can’t repair it directly in Acrobat, and the advice is to recreate it from the source file.
That’s not the whole story. Most PDFs that refuse to open still contain every page. What’s broken is the small index that tells a reader where those pages are, and an index can be rebuilt. This guide explains how, compares the free tools that do it, and is honest about the cases nothing can fix.
How a PDF is put together
A PDF isn’t read top to bottom like a text file. According to the PDF standard (ISO 32000), it has four parts: a short header such as %PDF-1.7, a body of numbered objects (pages, fonts, images), a cross-reference table listing the exact byte position of every object, and a trailer that ends with startxref, a number, and %%EOF. Incremental saves can leave an earlier version still in the file.
Inside a PDF file
A reader starts at the end, finds the cross-reference table, and uses it to jump straight to each page.
- %PDF-1.7Header
- ObjectsPages, fonts, images
- xrefWhere each object starts
- trailerstartxref · %%EOF
An interrupted download stops here: everything after about 80% of the file is missing, which takes out xref, trailer.
Because the reader starts from the end, two common accidents break everything at once. If a download stops early, the index and trailer are the first things lost. If a program edits the file but doesn’t update the index, every position in it points to the wrong byte. In both cases the pages are still sitting in the file.
The fix is to ignore the broken index, scan the file for every object marker (12 0 obj and so on), and build a new table. The maintainer of qpdf, a widely used open-source PDF library, describes exactly this: qpdf “and virtually every PDF reader” recover a damaged file this way, and files that were edited without being reindexed usually come back completely, while truncated ones only come back in part.
What a repair can and can’t do
| What happened | Typical symptom | Outcome |
|---|---|---|
| Index points to the wrong places | “File is damaged and could not be repaired”, or slow to open | Usually a full recovery |
| Download or copy was cut off | Won’t open, or opens with the last pages missing | Pages before the cut can be saved |
| Junk bytes before the header | “Not a PDF” even though it is one | Full recovery |
| Password-protected (encrypted) | Asks for a password, or a tool refuses it | Needs the password first |
| Page content overwritten by other data | Blank or garbled pages | Those pages are lost |
The free PDF repair tools, compared
We make Bytevive, so treat our row with the skepticism you’d give any vendor. Everything else in this table comes from each provider’s own pages, listed in the sources at the end.
| Tool | Where it runs | Free allowance | Paid | Files kept for |
|---|---|---|---|---|
| Bytevive | In your browser, nothing uploaded | Up to 300 MB per file, free account | None | Never stored |
| iLovePDF | Their servers | 1 file, 100 MB per task | US$9/month, or US$60/year | Up to 2 hours |
| Sejda (web) | Their servers | 50 MB or 200 pages, 3 tasks an hour | From US$5 for a week | 2 hours |
| PDF2Go | Their servers | 50 MB without an account | Monthly plans | Deleted within 72 hours |
| PDF24 | Their servers | No stated limit | None | Up to 1 hour after last use |
| Wondershare Repairit Online | Their servers | 3 files in total, 5 MB each | US$5.99 per file, or a plan | 3 hours |
| Recovery Toolbox for PDF | Their servers | Preview of what was recovered | US$10 per file (up to 1 GB) | Not stated |
| qpdf, mutool, Ghostscript | Your computer (command line) | Free, open source | None | Never uploaded |
Largest PDF you can repair for free
Per file, on each service's free tier. PDF24 states no limit, so it isn't charted.
- Bytevive
- 300 MB
- Runs in your browser
- iLovePDF
- 100 MB
- Sejda (web)
- 50 MB
- PDF2Go
- 50 MB
- Repairit Online
- 5 MB
- 3 files in total
A few things stand out. Smallpdf, one of the best-known PDF sites, has no repair tool at all. PDF2Go is unusually candid, saying its failure rate on badly damaged files is high. And if you’d rather not upload a sensitive document, Sejda Desktop processes files on your computer too, as does iLovePDF’s desktop app.
How to repair a PDF in your browser with Bytevive
- Open PDF Repair and sign in. The account is free; it’s how we keep the tool from being abused.
- Drop the PDF onto the page. It’s read by your browser and never sent anywhere.
- Bytevive checks the header, the end-of-file marker, and where
startxrefpoints, then opens the file with PDF.js (the engine behind Firefox’s PDF viewer), renders the first pages, and test-draws up to 60 of them. - If the index is broken, it rebuilds the file and opens the result again to make sure it really works before offering it to you.
- Download the repaired copy. If the file is encrypted or beyond saving, the report says so plainly.
The command-line route (free, on your computer)
If you’re comfortable with a terminal, three open-source tools do the same job:
# qpdf (Apache-2.0): rebuilds a damaged cross-reference table as it writes
qpdf damaged.pdf repaired.pdf
# MuPDF (AGPL): "can be used to repair broken files"
mutool clean damaged.pdf repaired.pdf
# Ghostscript (AGPL): re-creates the whole PDF from what it can read
gs -o repaired.pdf -sDEVICE=pdfwrite damaged.pdfqpdf is the gentlest: it keeps the original objects and only rebuilds the structure. Ghostscript is the heavy hammer. It draws every page and writes a brand-new PDF, which can rescue files the others reject, but its own documentation warns that anything that isn’t drawn on the page, such as comments, normally won’t survive.
When a PDF can’t be repaired
If every tool fails, the missing data simply isn’t in the file. Your best options are elsewhere:
- Download it again. A cut-off download is the most common cause, and a fresh copy fixes it.
- Check version history. OneDrive, Dropbox, Google Drive, and SharePoint all keep earlier versions of synced files.
- Ask the sender. For an email attachment, the original is still in their outbox.
- Recreate it. If you made the PDF, export it again from Word, InDesign, or whatever produced it.
The bottom line
A PDF that won’t open is usually a PDF with a broken index, and that’s fixable for free. Start with a tool that runs on your own device, so a private document doesn’t sit on someone else’s server: Bytevive in the browser, or qpdf if you like the command line. Keep the original either way, because a repair can’t bring back bytes that were never written.
Frequently asked questions
Is it safe to repair a PDF online?
Can a password-protected PDF be repaired?
Why does my PDF open in Chrome but not in Adobe Acrobat?
Will repairing a PDF change its contents?
How large a PDF can Bytevive repair, and does it require an account?
Sources
Every claim, error message, price, and limit cited above comes from these pages, checked on November 22, 2026. If one has changed, tell us at support@bytevive.com and we’ll update the article.
- Adobe: Can't open a PDF
- PDF Association: ISO 32000-2, clause 7 (file structure)
- qpdf maintainer on how damaged files are recovered (issue #679)
- qpdf command-line documentation
- MuPDF: mutool clean
- Ghostscript: PDF output (pdfwrite) notes
- iLovePDF pricing
- iLovePDF FAQ (file retention)
- Sejda Repair PDF
- Sejda Desktop
- PDF2Go Repair PDF
- PDF2Go privacy policy (retention)
- PDF24 Repair PDF
- Wondershare Repairit online store (limits and prices)
- Recovery Toolbox for PDF Online


