"Unexpected end of archive"

This error almost never means the archive is "corrupt" in some mysterious way. It means the file is short — the last bytes never arrived. Everything stored before the cut is usually still readable, and getting it back does not require handing the archive to a server.

Your file never leaves your device — repair runs in your browser. 0 bytes uploaded.

Your data is the big block — usually intact. What breaks is the small index. Repair rebuilds it.

Drop a file here or browseTap to choose a file

ZIP · Office · PDF · video · JPG · PNG · RAR/7z · SQLite — repaired right here in your browser. Nothing is uploaded

0 bytes uploadedFree: 3 repairs/day — up to 500 MB video, 100 MB docs & archives, 50 MB photos. Free download. Single repair €5.90. No account required.

Fix it now

  1. Drop the file
  2. Repair runs locally
  3. Download the result

WinRAR, 7-Zip and the command-line unzip all raise some form of "Unexpected end of archive" for the same underlying reason: they read the file expecting more bytes than are actually there. The download stalled, a copy off a USB stick was pulled early, or a cloud sync stopped halfway. Drop the archive above and the tool inspects its real structure in your browser — it locates the entries that were fully written before the truncation point and extracts those, rather than refusing the whole file because its tail is missing.

What the error means at the file-format level

A ZIP file is not one continuous blob — it is a series of local file entries followed by a central directory at the very end. Each entry begins with the signature PK\x03\x04, carries its own name, compression method and size, then the deflated data. After the last entry comes the central directory (PK\x01\x02 records), and the file finishes with the End Of Central Directory record, PK\x05\x06. That EOCD is the index: it tells the extractor how many files exist and where each one starts.

Here is the catch. The index lives at the very end of the file. When a download or copy is cut short, the tail is exactly what goes missing — so the extractor seeks to where the EOCD should be, finds data (or nothing) instead of the PK\x05\x06 signature, and reports "Unexpected end of archive." The archive is not scrambled; it is simply missing its table of contents, and possibly the last file or two.

RAR and 7z fail the same way for the same reason. A RAR keeps block headers and, at the end, an archive-end marker; a .7z keeps its header database at the tail of the file and typically compresses many files together into one solid stream. In every case the metadata the tool needs first is the metadata a truncation destroys first.

What still comes out, and how the salvage works

Because each ZIP entry is self-describing, the whole central directory is redundant for extraction — it is an index, not the data. The tool ignores the missing EOCD and instead scans forward from the top of the file, catching every PK\x03\x04 local header it can find and decompressing the deflate stream that follows while the bytes hold out. Any file that was completely written before the cut comes back intact; the one file that straddled the truncation point may come back partial or not at all. This runs as pure TypeScript in your tab — no archive utility installed, nothing sent anywhere.

RAR and 7z are more constrained but not hopeless. In a RAR the files stored before the truncation still decode, and a RAR authored with a recovery record repairs dramatically better because that record is designed to reconstruct missing blocks. A .7z is the fragile case: with no recovery record and solid compression chaining files together, losing the tail can break decompression for everything after the last complete block. The tool salvages what the surviving blocks allow and is honest when a solid stream can't be continued.

The honest limit: bytes after the cut are gone

No software can recover data that was never in the file. If the download stopped at 60%, the last 40% of the compressed data does not exist on your disk, and nothing — not this tool, not WinRAR's own repair, not a paid recovery suite — can invent it back. The fix for that is to re-download or re-copy the archive from the source so you have the complete bytes.

What we can reliably do is stop a partially-arrived archive from being a total loss. If nine of ten files landed before the connection dropped, there is no reason to lose the nine while chasing the tenth. And because the whole operation happens in your browser, an archive that might contain financial records, source code, or personal documents is never copied onto an unknown server just to peek inside it — you can watch the Network tab and confirm zero bytes leave.

What this can and can't fix

Can fix

  • A ZIP that lost its central directory / EOCD to a truncated download — entries before the cut are extracted by scanning local headers
  • Individual files inside a partially-downloaded ZIP that were fully written before the connection dropped
  • RAR archives where the files stored before the truncation point still decode
  • RAR archives that carry a recovery record (these repair substantially better)
  • 7z archives up to the last complete compression block that survived

Can't fix

  • Any file whose compressed data was located after the truncation point — those bytes are not on your disk
  • A 7z solid stream past its last intact block (later files in the chain can't be decompressed)
  • Archives that are also encrypted/password-protected when the password isn't supplied
  • A download so short only a fragment of the first entry arrived

If a repair fails, we tell you why (missing data versus broken structure), and you are never charged for a failed repair.

FAQ

Does "Unexpected end of archive" mean the whole file is corrupt?

Usually not. It almost always means the file is truncated — shorter than it should be because a download or copy was interrupted. The data written before the cut is typically fine; only the index at the end and any files past the cut are affected.

Can I get some of the files out if the rest are missing?

Yes, that is exactly the point of the salvage. In a ZIP the tool scans local file headers from the top and extracts every entry that was completely written, so a partly-downloaded archive still gives up its intact files instead of failing whole.

Why does 7-Zip repair my RAR but not my .7z?

RAR archives can be authored with a recovery record built for exactly this, and RAR blocks decode independently. A .7z often uses solid compression that chains files into one stream with its header table at the very end — losing the tail can break everything after the last complete block.

The archive is confidential. Is it uploaded to check it?

No. The archive is read from your disk and processed in your browser tab; nothing is transmitted. You can open the Network tab and confirm 0 bytes of the file leave your machine — useful when the ZIP holds documents you would rather not copy to a stranger's server.

Related: Repair a ZIP archive · "Compressed folder is invalid" · Verify the zero-upload claim