Skip to content
Bytevive

Corrupted ZIP or “unexpected end of archive”? How to get your files back

What breaks a ZIP file, why a cut-off download hurts it most, and how 7-Zip, WinRAR, zip -FF, ezyZip, zip.repair, and Bytevive compare at getting files back.

By the Bytevive team9 min read

A laptop on a train table showing WinRAR’s “Unexpected end of archive” error

Windows says “The compressed (zipped) folder is invalid.” WinRAR says “Unexpected end of archive.” The command-line unzip says “End-of-central-directory signature not found.” Different words, but nine times out of ten they mean the same thing: the archive is missing its last few bytes.

That sounds fatal. It usually isn’t, because of how ZIP files are built. Here’s why, how to get your files back for free, and how the repair tools compare.

Why a ZIP breaks at the end first

The ZIP format is defined by PKWARE’s APPNOTE specification. Each file is stored as a local header (signature PK\3\4) followed by its compressed data. After the last file comes the central directory, a list of every file and where it starts, and finally a short end of central directory record that points back to that list.

Inside a ZIP archive

Most tools read the end first. A cut-off download takes the central directory with it, even though most files survived.

  1. PK\3\4photo-01.jpg
  2. PK\3\4photo-02.jpg
  3. PK\3\4notes.docx
  4. PK\3\4video.mp4
  5. Central dir.List of files
  6. End recordPoints to list
First byteDownload stops hereLast byte

Download stops here: everything after about 71% of the file is missing, which takes out PK\3\4, Central dir., End record.

Not to scale. Here the first three files are complete, the video is partial, and the central directory and end record were never downloaded.

Most programs start by looking for that end record. When a download is interrupted, it’s the first thing missing, so the program reports the whole archive as broken. But the local headers in front of each file are still there. A repair tool can scan from the first byte, find each PK\3\4, and read the files one by one. The Info-ZIP manual describes this exact approach for its -FF option: “the archive is scanned from the beginning” for the signatures that mark each member. To see how that central directory works up close, try our interactive ZIP structure walkthrough.

The specification also stores a CRC-32 checksum for every file. After decompressing a file, a careful tool recomputes it. If the numbers match, the file is byte-for-byte what was originally zipped. If they don’t, the file is damaged, and you know not to trust it.

The ZIP repair tools, compared

ToolWhere it runsPriceFormatsWorth knowing
ByteviveIn your browser, nothing uploadedFree, up to 1 GB, free accountZIPChecks every file’s checksum and lists which ones survived
ezyZipIn your browser, nothing uploadedFree with ads, 2 GB; Pro removes bothZIP, RAR, 7zThe best pick today if you also need RAR or 7z
zip.repairTheir servers (upload)Free, no sign-upZIPSimple, but the archive leaves your device
Info-ZIP zip -FFYour computer (command line)Free, open sourceZIPBuilt into macOS and most Linux systems
WinRARYour computer (Windows)40-day trial, then US$29RAR, ZIPRepair archive (Alt+R) writes a separate fixed copy
7-ZipYour computerFree, open sourceManyNo repair command, but its Test command shows which files fail
DiskInternals ZIP RepairYour computer (Windows)FreewareZIPMoves intact files into a new archive
Wondershare RepairitYour computer (desktop app only)Paid; the trial only previewsZIP and moreZIP repair isn’t in the online version

One honest note: ezyZip works the same way we do, inside the browser, and it already supports RAR and 7z. If that’s what you have, use it. Where Bytevive differs is the report: it tells you, file by file, which ones passed their checksum, which were damaged, and which were encrypted, before you download anything.

Minutes spent uploading a 1 GB archive

Before an online repair service can even start. Calculated for 1 GB (8,000 megabits) at common home upload speeds.

10 Mbps upload
13.3 min
20 Mbps upload
6.7 min
50 Mbps upload
2.7 min
100 Mbps upload
1.3 min
Repair in the browser
0 min
Nothing to upload
Upload time = 8,000 megabits / upload speed. Real uploads are often slower than the advertised speed.

How to repair a ZIP in your browser with Bytevive

  1. Open ZIP Repair and sign in with a free account.
  2. Drop the archive onto the page. Your browser reads it; nothing is uploaded.
  3. Bytevive looks for the central directory, then scans the whole archive for file headers anyway, so it finds files the directory forgot or never listed.
  4. Each file is decompressed and its CRC-32 checked. The report marks every file as intact, damaged, or impossible to check (encrypted, or packed with an unusual method).
  5. Download a clean, rebuilt ZIP that contains the files that passed. Any unzip tool will open it.

The command-line route

On macOS or Linux, the zip command can do a structural repair. Use -F when only the central directory is slightly off, and -FF when the end of the file is missing:

# Rebuild from the existing table of contents
zip -F broken.zip --out fixed.zip

# Ignore the table of contents and scan the whole file
zip -FF broken.zip --out fixed.zip

The manual is clear about the limits: files whose checksum doesn’t match can’t be recovered this way, and an archive damaged by a text-mode FTP transfer is beyond it. On Windows, WinRAR’s Tools → Repair archive works on ZIPs as well as RARs and leaves your original untouched.

When files can’t come back

  • Files after the cut. They were never written to your disk, so there’s nothing to recover.
  • Files that fail their checksum. Some bytes inside them changed. A partial copy might still be useful for a text file, but not for most photos or documents.
  • Encrypted files without the password. Some command-line tools (like zip -FF) can copy encrypted entries untouched, while Bytevive flags them in the report and builds the new ZIP only from verified, unencrypted files. Either way, nobody can check or open encrypted entries without the key.

The bottom line

“Unexpected end of archive” usually means the end is missing, not the files. A tool that scans for file headers and checks every checksum can get back everything that was downloaded, for free and without uploading. Try Bytevive’s ZIP Repair for ZIPs, or ezyZip if you’re dealing with RAR or 7z. If you’re troubleshooting built-in OS extractors or 7-Zip specifically, see Windows “compressed folder is invalid” and Mac Archive Utility errors or 7-Zip’s “Can not open the file as archive” guide.

Frequently asked questions

Can a ZIP be repaired if the download was cut off?
Partly. Every file stored before the point where the download stopped can usually be recovered, because each one has its own header in the archive. Files after the cut were never downloaded, so the only fix for those is to download the archive again.
Why does Windows say the zipped folder is invalid when another tool opens it?
Tools read ZIPs differently. Some rely entirely on the table of contents at the end of the archive and give up if it's damaged. Others, including 7-Zip, WinRAR's repair command, and Bytevive, can fall back to the headers in front of each file.
Can you repair a password-protected ZIP?
No tool can check or unlock encrypted files without the password. Command-line tools like zip -FF can carry encrypted entries into a rebuilt archive untouched, whereas Bytevive lists encrypted entries in the report so you know which ones it couldn't test and builds the new ZIP only from intact, unencrypted files.
What about RAR and 7z files?
Bytevive handles ZIP only for now. For RAR, WinRAR's Repair archive command is the standard tool, and works best when the archive was made with a recovery record. ezyZip's browser-based repair also accepts RAR and 7z.
Is my ZIP archive uploaded when I use Bytevive?
No. Bytevive scans and rebuilds the ZIP locally inside your browser tab, so the archive never leaves your device. It's free for ZIP files up to 1 GB with a free 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.

  1. PKWARE: APPNOTE.TXT, the ZIP file format specification
  2. Info-ZIP zip manual (the -F and -FF options)
  3. 7-Zip FAQ
  4. WinRAR help: Repair archive
  5. WinRAR license pricing
  6. ezyZip: repair ZIP
  7. ezyZip pricing
  8. zip.repair
  9. DiskInternals ZIP Repair
  10. Wondershare Repairit: online vs desktop comparison

ZIP won't extract? Rescue what's inside.

Free account, archives up to 1 GB. Every file is checked, and nothing is uploaded.

Repair a ZIP, free

Other free tools: video, PDF, photo, Office, ZIP, and audio repair.