Skip to content
Aback ZIP

Troubleshooting · 5 min read · Updated

How to repair a corrupted ZIP file

Fix "unexpected end of archive" and "central directory not found" errors: find out what went wrong, what can be recovered from a damaged ZIP and how to rebuild it.

A ZIP that will not open is usually not a lost cause. Most damage comes from incomplete downloads and interrupted copies, and because ZIP stores a header in front of every file, a repair tool can often recover every file that arrived intact. What no tool can do is invent data that is not there, so it pays to understand the damage first.

Common error messages

MessageWhere you see itWhat it usually means
"Unexpected end of archive"7-Zip, WinRARThe file is cut short; the end of the archive is missing.
"End-of-central-directory signature not found"unzip on macOS and LinuxThe index at the end is missing: a truncated file, one part of a split archive, or not a ZIP at all.
"The compressed (zipped) folder is invalid"Windows File ExplorerCorruption, truncation, or a feature File Explorer does not support.
"Error 79 - Inappropriate file type or format"macOS Archive UtilityA damaged or truncated archive, or one Archive Utility cannot read.
"CRC failed", "Data error" or "Headers error"7-ZipSome file data or headers no longer match their checksums.
"Central directory not found" or "bad zipfile offset"Various toolsThe index is damaged, or extra bytes were added in front of the archive.

What usually causes the damage

  • Incomplete downloads, by far the most common cause. Compare the file size with the size shown on the download page.
  • Interrupted copies or moves, for example a USB drive unplugged too early.
  • FAT32 drives, which cannot hold files of 4 GB or more, so large archives passed through them may end up incomplete.
  • Text-mode transfers, such as old FTP clients in ASCII mode, which alter line-ending bytes throughout the file.
  • Split archives opened one part at a time, which look exactly like truncated ZIPs.
  • Failing disks or memory cards, which can damage bytes anywhere in the file.

What can and cannot be recovered

DamageWhat can be recovered
End of the file missing (truncated download)Every file that is complete before the cut. The file that was cut through is partly readable at best; anything after it is gone.
Central directory damaged, file data intactUsually everything: the header in front of each file is enough to rebuild the index.
A few corrupted bytes in the middleAll the other files. The damaged file fails its CRC check; with Deflate, data up to the damaged point may still be readable.
Encrypted filesCarried over into the repaired archive if complete, but they cannot be verified without the password.
A missing part of a split archiveOnly files stored entirely within the parts you have.
Large sections overwritten or zeroedOnly what lies outside the damaged region.

No tool can restore bytes that are not in the file. If a repair recovers 95% of the files, the remaining 5% need a fresh copy from the source.

Repair a ZIP in your browser

  1. Confirm the problem with Test ZIP Integrity. It checks every file's CRC-32 and the archive structure and lists exactly which files are affected. If the index is intact and only one file is bad, Extract ZIP can still pull out the good ones.
  2. If the file is one piece of a split set (.z01, .001), join the parts first with Join ZIP Parts.
  3. Open Repair ZIP and choose the damaged file. It scans the whole file for file records instead of trusting the damaged index.
  4. Each recovered file is decompressed and checked against its CRC-32, and verified files are copied byte-for-byte into a new, valid ZIP.
  5. Decide whether to keep partial files. The readable start of a damaged file can be useful for text, logs or media, but it is not the complete file.
  6. Download the repaired ZIP and run Test ZIP Integrity on it. Your original file is never modified.

Other repair options

  • Get a fresh copy. If the file came from a download, downloading it again is the most reliable repair. If the publisher lists a checksum, compare it using ZIP Checksum.
  • Info-ZIP: zip -F broken.zip --out fixed.zip fixes archives with a mostly intact index; zip -FF broken.zip --out fixed.zip scans the whole file when the index is missing.
  • 7-Zip: opening a truncated ZIP often still lets you extract the files before the damage, with errors reported for the rest.
  • WinRAR: Tools > Repair archive can rebuild ZIP archives as well as RAR.

Tools for this

Frequently asked questions

No. A repair can rebuild the archive's structure and recover every file whose data is intact, but data that is missing or overwritten cannot be recreated.

More guides