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

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.
- PK\3\4photo-01.jpg
- PK\3\4photo-02.jpg
- PK\3\4notes.docx
- PK\3\4video.mp4
- Central dir.List of files
- End recordPoints to list
Download stops here: everything after about 71% of the file is missing, which takes out PK\3\4, Central dir., End record.
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
| Tool | Where it runs | Price | Formats | Worth knowing |
|---|---|---|---|---|
| Bytevive | In your browser, nothing uploaded | Free, up to 1 GB, free account | ZIP | Checks every file’s checksum and lists which ones survived |
| ezyZip | In your browser, nothing uploaded | Free with ads, 2 GB; Pro removes both | ZIP, RAR, 7z | The best pick today if you also need RAR or 7z |
| zip.repair | Their servers (upload) | Free, no sign-up | ZIP | Simple, but the archive leaves your device |
Info-ZIP zip -FF | Your computer (command line) | Free, open source | ZIP | Built into macOS and most Linux systems |
| WinRAR | Your computer (Windows) | 40-day trial, then US$29 | RAR, ZIP | Repair archive (Alt+R) writes a separate fixed copy |
| 7-Zip | Your computer | Free, open source | Many | No repair command, but its Test command shows which files fail |
| DiskInternals ZIP Repair | Your computer (Windows) | Freeware | ZIP | Moves intact files into a new archive |
| Wondershare Repairit | Your computer (desktop app only) | Paid; the trial only previews | ZIP and more | ZIP 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
How to repair a ZIP in your browser with Bytevive
- Open ZIP Repair and sign in with a free account.
- Drop the archive onto the page. Your browser reads it; nothing is uploaded.
- 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.
- 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).
- 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.zipThe 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?
Why does Windows say the zipped folder is invalid when another tool opens it?
Can you repair a password-protected ZIP?
What about RAR and 7z files?
Is my ZIP archive uploaded when I use Bytevive?
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.


