How to Repair a Corrupted ZIP or RAR File (and When You Can't)
"Repair" can mean very different things. A ZIP whose last few kilobytes are missing can often be rebuilt; a file with damaged compressed data usually cannot be fixed, only partly rescued. This guide helps you tell the cases apart, shows the tools and commands that genuinely help, and explains when a fresh copy is the only real fix.
Updated 2026-10-13 · Written and tested by the UnpackNest editorial team (TECCONET)
Step 1: make a copy before you try anything
Repair tools write new files, but some recovery steps are destructive if you get a command wrong. Copy the damaged archive to a separate folder and work only on the copy. Keep the original until you have the files you need.
Step 2: find out what kind of damage it is
The error message tells you most of what you need to know. Open the archive in two different tools and note the exact wording.
| Symptom | Likely cause | Can it be repaired? |
|---|---|---|
| "Unexpected end of archive", file smaller than expected | Download stopped early (truncation) | Partly: files that arrived completely can often be recovered |
| ZIP: "central directory not found" / "invalid archive" | The end of the ZIP is missing or damaged | Often: the directory can be rebuilt from local headers |
| "CRC failed" on some files only | Damaged data inside those files | Rarely: other files are fine; damaged ones need a fresh copy |
| RAR: "Corrupt header" | Damaged header block | Sometimes, especially with a recovery record |
| "Wrong password" or CRC errors in an encrypted archive | Often a wrong password, not damage | Try the password again first |
| File is tiny (a few KB) | An error page saved as .zip/.rar | No: there is no archive to repair |
See what UnpackNest reports
UnpackNest's tools do not attempt repairs, but they are a quick, private way to diagnose. The ZIP tool reads the central directory at the end of the file, so a cut-off download is detected immediately, before you waste time with other tools.
- Open the ZIP tool or the RAR tool.
- Choose the damaged file.
- Read the status line. "The archive is incomplete or truncated" means the end is missing. A checksum error on one entry means that entry's data is damaged.

Repairing a ZIP
Rebuild the central directory with Info-ZIP
Every file in a ZIP also has a small local header in front of its data. When the central directory at the end is lost, zip can scan those headers and write a new archive.
- Install Info-ZIP (
sudo apt install zipon Debian or Ubuntu; it is preinstalled on macOS). - Run
zip -FF damaged.zip --out fixed.zipand answer the prompts. - Test the result:
unzip -t fixed.zip.
zip -F (one F) is a lighter fix for a slightly damaged directory; -FF scans the whole file and is the one to use for truncated downloads. Files that were completely downloaded come back; the file that was being written when the download stopped is usually lost.
Extract what you can with 7-Zip
7-Zip often lists and extracts the intact files of a damaged ZIP even when Windows refuses to open it. Open the archive in 7-Zip, select everything, and extract. It reports errors on broken entries and keeps going. On Linux: 7zz x damaged.zip -orescued.
Repairing a RAR
Use the recovery record, if there is one
RAR can store a "recovery record": extra parity data added when the archive was created. With it, WinRAR can rebuild damaged parts.
- Open the archive in WinRAR.
- Choose Tools > Repair archive (Alt+R).
- Choose a folder and press OK. WinRAR writes
rebuilt.name.rar(orfixed.name.rar). - Open the rebuilt archive and test it with Tools > Test archive.
From the command line, rar r damaged.rar does the same. Without a recovery record, Repair can only reconstruct the headers it can still find, so damaged data stays damaged.
Missing parts of a multi-volume RAR
If a set came with .rev files, WinRAR can rebuild a missing or damaged volume from them: put all parts and .rev files in one folder and open the first part. Without .rev files, a missing volume cannot be recreated.
What does not work
- Renaming the file. It only helps when the file is a different format with the wrong extension.
- "Online repair" sites. They require uploading your archive, and many simply run the same open-source commands shown above. For private files, run the commands yourself.
- Repeated repair passes. If one careful pass fails, more passes on the same damaged data rarely help.
- Expecting a damaged file to return. Compressed data depends on what came before it; once bytes are wrong, the rest of that file is usually unreadable.
The fix that works most often: a fresh copy
Most "corrupted" archives are incomplete downloads or damaged transfers, and the source still has a good copy.
- Compare your file size with the size on the download page.
- If a SHA-256 checksum is published, compare it:
certutil -hashfile file.zip SHA256on Windows,shasum -a 256 file.zipon macOS and Linux. - Download again on a stable connection, without download accelerators.
- If the second copy has the same checksum and still fails, the archive was damaged before upload. Ask the sender to recreate it.
Preventing damage next time
- Ask senders to publish a SHA-256 checksum for large archives.
- When you create important RAR archives, add a recovery record (WinRAR: Add recovery record, 3 to 5 % is typical).
- Avoid storing your only copy on a cheap USB stick or memory card; they fail without warning.
- For big transfers, split archives into parts so a bad part can be resent on its own.
Frequently asked questions
Can a corrupted archive damage my computer?
Not by being damaged. But a "corrupted" archive from an unknown sender that asks you to run a "repair tool" is a common trick; do not run unexpected programs.
Why do other files extract but one fails?
ZIP and non-solid RAR archives store each file separately, so damage stays local. Solid RAR and 7z archives compress files together, so damage can spread to later files.
Is there a tool that fixes every corrupted ZIP?
No. Tools can rebuild structure and skip broken parts. They cannot recreate data that was never downloaded or was overwritten.
Tools for this task
- Open and extract ZIP files in your browserStore, Deflate and ZIP64, read on your device.
- Open and extract RAR files in your browserRAR4 and RAR5, read on your device.