Repair a Corrupted PDF Rebuild the index of a damaged file and recover the pages that are still readable

Drop the file that will not open into the emerald zone below and press the button. Almost every PDF that refuses to open carries the same injury: a broken cross-reference table, which is the index at the end of the file telling a reader which byte each object starts at. The pages themselves are usually untouched. The map to them is not. So the engine ignores that index completely, walks the raw file byte by byte collecting every object it can still find, and writes a new document with an index measured from where those objects actually land. Nothing is uploaded, which is the only sensible way to handle a file you are already worried about.

  • Files never leave your device
  • No installation, no watermark
  • Works offline once the page is open
Fix a damaged PDF Live
Privacy
100% private
Your plan
Free to use
You get
Single PDF
Select the damaged PDF or drop them anywhere on this page One PDF - up to 100 MB - repaired locally, never uploaded

Your files are read by JavaScript running on your own machine. There is no upload, no queue, and no copy on our server to delete later.

The repair tool above works right now. The guide below explains what is actually broken when a PDF will not open - the six symptoms that cover nearly every case, which of them recover completely and which genuinely do not, what the engine does step by step, and how to tell a damaged file apart from one that is merely encrypted.

How to Repair a Corrupted PDF File

Under a minute, and nothing to install. This PDF repair tool runs inside the page you are reading, on your own processor. A file you are trying to recover is often the only copy of something that matters, and uploading it to a stranger at that moment is a poor instinct.

  1. 1

    Add the file that will not open

    Drop it into the Repair PDF upload zone. Every other tool in this suite refuses a file it cannot parse and sends you here; this one is built for exactly that file, so a card reading "Unreadable" is what you should expect to see on this page.

  2. 2

    Let the engine walk the bytes

    Press Repair PDF. The engine does not read the file's index, because the index is usually the broken part. It scans the whole file sequentially looking for object headers, steps over stream bodies wholesale so that compressed image data is never mistaken for structure, and collects everything it finds.

  3. 3

    Read what it found and what it fixed

    The result screen lists every finding: junk in front of the header, streams whose declared length was wrong, compressed object containers unpacked, a page tree rebuilt, a missing catalog reconstructed. Each line names what was done to your file, and there is no generic success message.

  4. 4

    Download it and check it opens

    The repaired file is verified by re-parsing it before you are handed it, and the result screen tells you whether that succeeded and how many pages came through. Open it and look at the pages - recovery is about structure, and only you can tell whether the content that survived is the content you needed.

What Actually Goes Wrong With a PDF

A PDF is two things stacked on each other: a pile of numbered objects, which hold the pages, the fonts, the images and the text, and an index at the end of the file that says which byte each object starts at. That index has a name: the cross-reference table. Every reader jumps straight to it and trusts every number in it. Almost every "corrupted PDF" is a file where the objects are perfectly intact and the cross-reference table is wrong.

That is very good news, and it is why this tool works as often as it does.

SymptomWhat actually happenedRecoverable
"There was an error opening this document. The file is damaged and could not be repaired."The cross-reference table points at the wrong offsets, or the pointer to it is wrong. The pages are untouched.Almost always, completely.
The file opens but shows blank pages, or fails halfway throughA stream declares a length that does not match its data, so the reader consumes the wrong bytes and everything after it derails.Usually, completely.
The reader says it is not a PDF at allSomething is in front of the header - an HTML error page a download captured, a mail gateway banner, a proxy notice - which shifts every offset in the file.Almost always, completely.
It opens in one reader and not in anotherA structurally invalid file that a forgiving reader silently works around and a strict one refuses.Usually. The rebuild produces something both accept.
The file is much smaller than it should be, or ends mid-sentenceA truncated download or an interrupted save. The missing bytes are genuinely gone.Partially. Whatever arrived is recovered; what never arrived cannot be.
Every page is noise or solid grey blocksThe bytes were altered in transit or on a failing disk. The compressed data no longer decompresses to anything.No. Nothing can invent the original data back.

The message "could not be repaired" from Acrobat does not mean it cannot be repaired. It means Acrobat's own recovery pass, which is conservative and fast, did not manage it. A rebuild that ignores the index completely and walks the file often succeeds where that gives up.

The classic one: text mode transfer

Still common, decades after it should have died. An FTP client, a mail gateway or an old integration transfers a PDF in text mode and helpfully converts every line ending from one convention to another. A PDF is binary. Every one of those conversions shifts every byte after it, so the file arrives with a perfectly valid index pointing at the wrong places, and inside the compressed streams the data is now damaged too. The structural half of that is repairable; the streams that were altered are not.

This is exactly why every PDF written by this suite starts with a line of high-bit binary characters after the header. It is a marker that tells software the file is not text, and it is the reason those files survive gateways that mangle other people's.

The Engineering Behind Rebuilding a Broken PDF

The whole approach rests on one decision: do not trust anything the file says about itself. Not the index. Not the pointer to the index, not the declared length of any stream, not the position of the header. Every one of those is a claim the file makes, and in a damaged document at least one of those claims is false, which is exactly why a reader that believes all of them hands you an error message.

  1. Find the real beginning. The header is found by searching for it, never by assuming it sits at byte zero. Anything in front of it is junk and is removed, which by itself fixes every file that arrived with an error page stapled to the front.
  2. Walk the file for object headers. A sequential scan for the pattern that starts every object, checking what precedes it so that the same text inside a compressed image is not mistaken for structure.
  3. Step over stream bodies wholesale. When an object turns out to hold a stream, the scan jumps the entire body rather than reading through it. This is the difference between a scanner and a global search: a global search finds hundreds of false objects inside image data and hands back a document made of noise.
  4. Distrust every declared length. A stream says how long it is. The engine believes it only if the end-of-stream marker is actually there, and otherwise finds the real end by scanning. Every correction is counted and reported.
  5. Take the last definition of each object. PDFs are updated by appending, so an object can appear several times. The last one in the file is the current one.
  6. Unpack the compressed containers. Modern files pack most small objects into compressed streams. Those are opened and their contents promoted to ordinary objects so that every object in the output is directly addressable.
  7. Rebuild the page tree if it is missing. If the catalog is gone, every surviving page object is collected, a fresh tree is hung over them and a new catalog is written.
  8. Write a new file and measure every offset as it goes. This is the point. The index in the output is built from where each object actually landed during writing, so it cannot disagree with the file it describes.
Index handling
Ignored on read. Rebuilt from measured offsets on write.
Declared lengths
Verified against the data, corrected by scanning when wrong.
Object streams
Unpacked, so every object is directly addressable.
Page tree
Rebuilt from surviving page objects if the original is gone.
Catalog
Reconstructed if missing, with a note about what was lost with it.
Verification
The output is re-parsed before you are handed it.

Recovering a document with no catalog

The catalog is the object that says "this is a document and here is its page tree". Lose it and every reader gives up on the whole file. The pages are still there, every one of them. The engine collects the surviving page objects, hangs a fresh tree over them in the order they were written, re-parents each one and writes a new catalog.

None of that is guesswork: the pages handed back are the original objects, untouched. What is genuinely lost is whatever else hung off the catalog - bookmarks, the form definition, embedded attachments, the document outline - because the object that named them is the object that went missing. The result screen tells you that on the spot, instead of leaving you to discover it a week later.

Three Files That Look Broken and Are Not

Rule these three out first. Repairing them achieves nothing, and in each case the actual fix is somewhere else entirely.

  • It is encrypted, not damaged. If a password prompt appears, or a reader says the file is protected, nothing about the file is broken. Use Unlock PDF with the password you have. This tool detects encryption, stops, and says so on the file card, because there is nothing here to repair and running a rebuild over an encrypted document would only mangle it. It makes no attempt to bypass or crack the encryption.
  • It is not a PDF. A file renamed to .pdf is still whatever it was. If there is no header anywhere in it, the tool says so plainly: it is not a damaged PDF, it is not a PDF.
  • It is an incomplete download. Check the file size against the source. A file that is 40 KB when it should be 4 MB has not been corrupted, it has not finished arriving. Download it again first - that costs a minute and recovers everything, where a repair recovers only what arrived.

Always try to get a fresh copy before repairing. Check the sent folder, the shared drive, the version history, the person who sent it. A repair is a genuinely good answer when the original is gone, and a poor one when a complete copy is thirty seconds away.

What You Can Realistically Get Back

The honest framing, because this is a category full of tools that promise everything and quietly return a two page document from a two hundred page original.

If the bytes of an object were deleted or overwritten, they are gone. No software invents them back, and any tool suggesting otherwise is describing something else. What a rebuild recovers is everything still structurally present and readable in the file you have, wrapped in a corrected structure. That covers most damaged PDFs, and it is a genuinely different promise from recovering a document.

DamageTypical outcome
Broken or missing indexFull recovery. Every page, font, image and annotation.
Junk in front of the headerFull recovery.
Wrong stream lengthsFull recovery in nearly all cases.
Missing catalogEvery page recovered. Bookmarks, forms and attachments lost with the object that named them.
Truncated fileEverything that arrived, which is usually the first several pages. The rest never reached your disk.
Altered bytes inside streamsStructure fixed, damaged pages still damaged. Undamaged pages come through clean.

One case deserves its own note, because it is the most disappointing and the most misunderstood. A truncated file can be recovered up to the byte where it stops, and everything after that byte was never written to your disk at any point. Recovering four pages out of forty is the honest answer about a file that only ever contained four. The repair did not fail there. The download did.

If the tool finds nothing usable, it says so and does not hand you a file. A one page document containing nothing, presented as a successful recovery, is worse than a clear failure - it wastes the time you would otherwise spend looking for a real copy.

How PDFs Get Damaged in the First Place

Read this part if it has happened to you more than once. The causes are boring, repetitive and almost entirely preventable.

  • Transfers in text mode. FTP clients, old mail gateways and some integrations convert line endings. Force binary mode. Every occurrence of this produces a file that is broken in exactly the same way.
  • Interrupted saves. Writing straight to a network share or a USB stick and losing the connection halfway leaves a file with a valid start and no index. Save locally, then copy.
  • Editing the same file from two places. Two applications appending updates to one document on a shared drive produces a file whose index describes a state that never existed.
  • Failing storage. If several unrelated files go bad on the same drive, the drive is the problem and repairing the files individually is treating the symptom.
  • Cheap PDF generators. Some produce structurally invalid files that Acrobat silently tolerates and stricter software refuses. Running one through this tool once produces a clean version you can keep.

That last case is a genuinely good use of this tool and has nothing to do with damage. If a system keeps rejecting your PDFs as invalid, rebuild them here. The output is normalized: one clean index, verified stream lengths, no accumulated update history. That is often enough on its own to satisfy a validator which had been refusing the original file for reasons nobody in the building could identify.

Zero-Trust Processing: The File Never Leaves Your Machine

Consider what an upload based recovery service is being handed. A document important enough that you are trying to rescue it, in a state where you have no other copy, sent to a machine you do not control. The moment you care most about a file is a poor moment to give it away.

Here the rebuild runs where the file already is. The byte scan, the object collection, the container unpacking and the file writing all happen in this tab, on your processor. There is no upload endpoint because there is no server side to the operation.

File upload
None. Read from your disk by the browser.
Server storage
Nothing. No copy is made, so there is none to delete.
Processing
JavaScript in this tab.
Works offline
Yes. Load the page, disconnect, repair.
The original
Never modified. The repair is written to a new file.

Your original file is never touched. The repair is written as a new download and the file on your disk is left exactly as it was, so a repair that does not help costs you nothing and you can try something else afterwards.

The Limits, Stated Before You Hit Them

Every tool in this suite carries this section. Here is what this one cannot do.

  • It cannot recover data that is not in the file. Truncated means truncated. What arrived is recoverable; what did not is gone.
  • It cannot repair damaged image or font data. If the bytes inside a compressed stream were altered, the structure around them is fixed and the stream still decompresses to noise.
  • It does not repair encrypted files. An encrypted document has to be opened before anything can read it. Unlock PDF first, then repair.
  • The output can be larger than the input. Compressed object containers are unpacked so that every object is directly addressable. That is the trade for an index that is provably correct.
  • It does not preserve the update history. A document with several appended revisions is flattened to its current state. That is usually what you want from a recovery, but a signature over an earlier revision will not survive it.
  • It does not validate against PDF/A. The output is a structurally clean PDF, not an archival one. That is PDF to PDF/A.

Where This Fits in a Real Working Day

Repair is almost always a step on the way to something else. Something needed to happen to the document and the document would not open.

What you were trying to doThe order that works
Merge a batch and one file breaks the runRepair the offending file, then merge again. The other tools refuse an unparseable file on purpose rather than producing a broken output.
Extract text from a document that will not openRepair, then convert to Word or to Markdown.
Print an archived file that a reader rejectsRepair. A structurally normalized file is often accepted by software that refused the original for no visible reason.
Salvage something readable from a partial downloadRepair to recover the pages that arrived, then extract the good ones into a clean document.
Feed a rejected PDF into a system that validates strictlyRepair to normalize it, then re-submit. One clean index, verified lengths, no accumulated history.

And keep the original until you have confirmed the repair. The tool never modifies it, so you lose nothing by trying, and a second attempt with different software is always possible. The rest of the PDF suite is built on the same architecture as this page - nothing uploaded, nothing stored, everything on your own machine.

Frequently Asked Questions

How do I repair a corrupted PDF file?

Drop it into the zone at the top of this page and press Repair PDF. The engine ignores the file's own index and walks the raw bytes looking for objects that are still readable, then writes a new document whose cross-reference table is measured as that file is written. The result screen lists exactly what it found and what it fixed. No account is needed for a first run and nothing is uploaded.

Acrobat says the file is damaged and could not be repaired. Is it gone?

Not necessarily. That message means Acrobat's own recovery pass gave up, not that recovery is impossible. Its pass is conservative and fast. A rebuild that ignores the index completely and scans the whole file for objects frequently succeeds where that fails, because in most damaged PDFs the pages are perfectly intact and only the map to them is wrong.

What is actually broken when a PDF will not open?

Almost always the cross-reference table - the index at the end of the file that says which byte each object starts at. The objects themselves, meaning your pages, fonts and images, are usually untouched. Junk in front of the header, a wrong pointer to the index, or a stream that lies about its own length all produce the same symptom and all rebuild cleanly.

Can you recover a PDF that only downloaded halfway?

You get back everything that arrived, which is usually the first several pages, and nothing that did not. The missing bytes are not damaged, they were never on your disk, so no software can produce them. Before repairing, check whether you can simply download it again - that costs a minute and recovers the whole document.

Is my file uploaded to a server to be repaired?

No. The file is read from your disk by the browser, rebuilt in memory, and written back to your downloads folder. A file you are trying to recover is often the only copy of something that matters, and handing it to a stranger at that moment is a poor instinct. Verify by disconnecting from the internet after this page loads.

Will repairing modify my original file?

Never. The repair is written as a new download and the file on your disk is left exactly as it was. A repair that does not help costs you nothing, and you can try other software afterwards on an unchanged original.

My PDF asks for a password. Will this fix it?

No, and the tool tells you so rather than mangling the file. A password prompt means the document is encrypted, not damaged - nothing is broken. Use Unlock PDF with the password you have, and repair afterwards if it still will not open.

Why is the repaired file bigger than the original?

Because compressed object containers are unpacked so that every object is directly addressable, which is the trade for an index that is provably correct. Every byte offset in the output was measured as it was written rather than copied from something that was already wrong. The increase is typically small and the file is a normal PDF in every other respect.

Can it recover the pages if the document catalog is missing?

Yes. Every surviving page object is collected, a fresh page tree is hung over them, each page is re-parented and a new catalog is written. The pages are the original objects, untouched. Bookmarks, form definitions and embedded attachments are lost, because the object that named them is the object that was missing, and the result screen says so explicitly.

The pages come back as grey blocks or noise. Can that be fixed?

No, and no tool can. That means the bytes inside the compressed streams were altered - by a transfer in text mode, a failing disk or memory corruption - so they no longer decompress to anything. The structure is repairable and the data is not. Look for another copy.

Can I use this on a PDF that is not damaged?

Yes, and it is a genuinely useful thing to do. If a system keeps rejecting your PDFs as invalid for reasons nobody can identify, rebuilding here produces a normalized file: one clean index, verified stream lengths and no accumulated update history. That is often enough to satisfy a validator which refused the original.

Why do some repair tools hand back a PDF full of garbage pages?

Because they search the whole file globally for anything that looks like an object, and compressed image data is full of byte patterns that look exactly like one. This engine scans sequentially instead. When it meets an object holding a stream it jumps the entire stream body in one move, so the contents of a photograph are never read as structure, and the output contains the objects the document really had.

What if the tool cannot recover anything?

It says so and does not give you a file. A one page document containing nothing, presented as a successful recovery, is worse than a clear failure - it wastes the time you would otherwise spend looking for a real copy. If there is no header anywhere in the file, it also tells you the file is not a PDF at all.

Do I need an account to repair a PDF?

Not for a first run. Anonymous visitors get one operation per 12 hours counted by network address, a free account gets two, and CartHacker Premium removes the counter. One repair is one operation however many pages come out of it. The processing is identical and local at every tier - the damaged file is never uploaded regardless of what you have paid.

The rest of the PDF suite

All of these run the same way: your file is read by JavaScript on your own machine, the work happens on your processor, and the result is handed back to you as a download that never existed anywhere else.

Free CartHacker tools

Free speed test and trust badges for Shopify and WooCommerce stores

Find the apps that slow your store down, by name and in milliseconds, then answer shoppers' doubts with trust badges under Add to cart. Both are free, with no card and no access to your store admin.

Store Speed Test

Which app is slowing your store down?

Paste any page and get its three Core Web Vitals, the apps costing time, like Klaviyo or Judge.me, and the Shopify or WooCommerce fix.

  • 1 free test a day, no sign-up
  • 5 a day on a free account
  • Google's Lighthouse engine
Trust Seals & Badges

Do shoppers hesitate at Add to cart?

Show the promises that settle doubts, from free shipping to a money-back guarantee, right under the Add to cart button. One line in your theme.

  • 8 badges in 2 styles, free
  • Premium: 50 badges, 30 languages
  • View counts from the first shopper
Build my trust badges Design them without signing up.
Also free
QR Code Generator

Change the link after printing and count the scans. 5 tracked codes on a free account, static codes unlimited.

  • Logo and colors
  • SVG for print
  • Wi-Fi and business cards