"Cannot open file '<name>.7z' as archive"

This message fires before 7-Zip lists a single file: it means the program could not read the archive's header at all, so it never got as far as extracting. That header lives at the very end of a <code>.7z</code>, which is exactly the part a truncated download loses — but the compressed data usually arrived first and is still sitting on your disk. Getting it back is a matter of rebuilding the header 7-Zip could not read, and it does not require handing the file to a server.

When 7-Zip pops up "Cannot open file '<name>.7z' as archive", it is telling you it failed at the very first step — reading the archive's table of contents. Unlike "Data error" or "CRC failed", which happen while a file is being extracted, this error means 7-Zip could not even build the list of what is inside. A .7z keeps that list in a header record at the end of the file, and there are only a few things that stop 7-Zip reaching it: the download stopped before the footer arrived, junk bytes are stuck in front of the real archive, or a byte in the header itself is wrong. Drop the file above and IntactFile inspects its true structure in your browser, re-anchors or rebuilds the header 7-Zip choked on, and salvages the members that completed — nothing is uploaded.

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

Why 7-Zip can't even open the file

A .7z is built in an unusual order, and that order is the whole reason for this error. The file opens with a 32-byte signature header: the six magic bytes 37 7A BC AF 27 1C, two version bytes, a 4-byte CRC, and then a 20-byte Start Header. That Start Header does not contain your files — it contains three numbers: NextHeaderOffset, NextHeaderSize, and NextHeaderCRC. In other words, the very front of the archive is just a pointer to a second header stored at the tail of the file, after all the compressed data. That trailing structure — 7-Zip's End Header, or header database — is what actually describes every file: its name, size, CRC-32, and which compressed stream it lives in.

So when you open a .7z, 7-Zip reads the 20-byte Start Header, jumps to NextHeaderOffset (measured from the end of the signature header), and reads NextHeaderSize bytes to learn the contents. If it cannot do that, it has no list to show and raises "Cannot open file as archive". Three things break that jump. Most common by far is a truncated download: the transfer stopped before the tail arrived, so NextHeaderOffset now points past the last byte on disk and the End Header simply is not there. Second is a stray prefix — extra bytes wedged in front of the 37 7A BC AF signature, from a mangled email/MIME decode, an HTML "can't scan this file" page saved under a .7z name, two files concatenated by accident, or a self-extracting .exe stub that no longer runs. Every offset in the file is now shifted, so the pointer lands in the wrong place. Third is a flipped or zeroed byte inside the Start Header or the End Header itself; because 7-Zip verifies both with a CRC, a single bad byte makes it reject the header rather than trust a corrupt index.

One extra twist makes 7z fail harder than a ZIP here: 7-Zip usually stores its End Header compressed (an "encoded header"). The program has to decode that little block before it knows anything at all about your files — so if the encoded header is truncated or has one wrong byte, there is no partial reading of the index. It is all or nothing, and "nothing" is this exact message.

"Cannot open as archive" vs "Unexpected end of data" vs "Data error"

7-Zip is unusually precise about where it gave up, and the exact wording tells you which problem you have — worth reading before you try anything, because they are not the same failure.

  • "Cannot open file as archive" — an open-time failure. 7-Zip could not read the End Header, so it never produced a file list. This is the header/pointer problem above: a missing tail, a stray prefix, or a bad header CRC. You are on the right page.
  • "Unexpected end of data" / "Unexpected end of archive" — an extract-time failure. Here the header was readable, 7-Zip showed you the file list, and then a packed stream ran out mid-file while extracting. That is truncation of the data rather than the index — see "Unexpected end of archive" for that family across 7-Zip, WinRAR and tar.
  • "Data error" / "CRC failed" — also extract-time, but a byte in the middle is wrong, not missing. The archive is full length, 7-Zip opened it fine, and one entry's decompressed bytes do not match the CRC-32 stored in the header. That is bit-rot in a single member, not a broken index.
  • "is not archive" — 7-Zip could not find the 37 7A BC AF 27 1C signature anywhere it looked, so the file may not be a 7z at all (or the prefix in front of it is very large).

If your message is specifically "Cannot open file as archive", the diagnosis is the header, not the payload — which is good news, because the payload is the part that is usually still intact.

What rebuilding the header actually recovers

The compressed data in a .7z sits before the End Header, so a broken or missing tail does not touch the bytes that arrived first. IntactFile works with the structure directly instead of trusting the pointer 7-Zip could not follow. The cleanest case is the stray prefix: the tool scans for the 37 7A BC AF 27 1C signature, strips whatever junk sits in front of it, and re-anchors the file to the true start. If the archive behind that prefix is otherwise whole, the End Header is now reachable again and the archive opens completely — every file, exactly as authored. This is the same idea our video engine uses when it strips stray bytes before an ftyp box: the container was fine, it was just misaligned.

When the tail is genuinely missing — the truncated-download case — there is no End Header to re-anchor to, so the tool rebuilds what it can: it re-reads the signature and Start Header, re-scans the packed streams that survived, and reconstructs enough of the directory to decode the coder streams that completed before the cut. Every member whose compressed block finished arriving is salvaged and written out; the ones that did not finish, or that lived entirely in the missing tail, cannot be conjured. All of this runs as plain TypeScript inside your browser tab — no 7-Zip install, no command line, and you can watch the Network tab confirm that zero bytes of a private archive ever leave your machine.

The honest ceiling for a headerless .7z

Be clear-eyed about this one: a headerless .7z is the hardest common archive to salvage, and it is worth knowing why. In a ZIP, every file is preceded by its own self-describing local header (PK\x03\x04) with the name and compression method, so a forward scan can rebuild a lost index from the entries themselves. A .7z has no per-file headers in the data area — the packed streams are just concatenated compressed bytes, and all the metadata (names, sizes, CRCs, coder settings, stream boundaries) lives only in that one End Header at the tail. Lose it entirely and there are no signposts left in the payload; recovery depends on reconstructing structure the format never duplicated.

7z's default of solid compression tightens the ceiling further. Solid mode chains many files into a single LZMA/LZMA2 stream (a 7z "folder") to compress better, so the decoder is stateful: once the stream is cut, everything after the last complete block is unrecoverable, even files whose bytes technically arrived, because they cannot be decoded without the state that preceded them. And nothing anywhere can return bytes that never reached your disk — if the download stopped at 70%, the final 30% does not exist locally, and the real fix for that is to download the archive again, ideally with a client that supports HTTP range requests so it can resume instead of restarting. A password-protected .7z (7z uses AES-256, and can encrypt the header itself) cannot be opened or scanned without the password, because both the index and the data are ciphertext with no structure to follow. What repair reliably prevents is a partly-arrived or misaligned archive becoming a total loss — and it does it without ever copying your files to someone else's server.

What this can and can't fix

Can fix

  • A .7z with junk bytes wedged before the 37 7A BC AF 27 1C signature (bad email/MIME decode, an HTML error page saved as .7z, concatenated files, a dead SFX stub) — re-anchoring to the signature opens it in full when the tail is intact
  • A truncated .7z that lost its End Header (the header database at the tail) to a cut-off download — members whose packed streams completed are rebuilt and salvaged
  • A .7z rejected because its Start Header or NextHeader CRC failed on a flipped byte, where the compressed streams themselves survived
  • Non-solid .7z archives, where each file's block can be decoded independently up to the truncation point
  • Recovery that runs entirely in your browser tab — no 7-Zip install, no command line, nothing uploaded

Can't fix

  • Compressed bytes that never reached your disk — a download that stopped at 70% is missing the last 30%, and no tool can invent it (re-download instead)
  • Files after the last intact block in a solid .7z (7z's default), which chains members into one stateful stream so a lost tail breaks everything downstream
  • Password-encrypted .7z archives without the password — with AES-256 the header and data are both ciphertext
  • A file so short that only a fragment of the packed streams arrived, with no complete block left to decode

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

FAQ

Why does 7-Zip say "cannot open file as archive" instead of "unexpected end of data"?

They point at different stages. "Cannot open file as archive" is an open-time failure: 7-Zip could not read the header record at the tail of the file, so it never produced a list of contents. "Unexpected end of data" means it did open the archive and show you the files, then ran out of bytes while actually extracting one — a truncated payload rather than a broken index. If you see the first message, the problem is the header, which is usually the most recoverable case.

Is my data still there if 7-Zip won't open the archive at all?

Usually, yes. The compressed data in a .7z is stored before the header record at the tail, so a missing or damaged tail does not touch the bytes that arrived first. Repair re-anchors or rebuilds the header 7-Zip could not read and salvages the members that completed. The honest caveat is that .7z keeps all its per-file metadata only in that one tail header, so it is harder to salvage headerless than a ZIP — and a solid archive can only be recovered up to its last intact block.

My .7z has junk at the start, or came out of an email. Can that be fixed?

That is the cleanest case. Extra bytes in front of the real archive — from a mangled MIME/base64 decode, an HTML error page saved under a .7z name, two files concatenated, or a broken self-extracting stub — shift every internal offset so the header pointer misses. The tool scans for the 37 7A BC AF 27 1C signature, strips the prefix, and re-anchors the file; if the archive behind it is otherwise whole, it then opens completely.

Is my archive uploaded to be repaired?

No. The .7z is read from your disk and processed in your browser tab; the reader is plain TypeScript and nothing is transmitted. You can open the DevTools Network tab, run the recovery, and confirm 0 bytes of the file leave your machine — which matters when a .7z holds source code, financial records or personal documents you would rather not copy to a stranger's server.

Related: "Unexpected end of archive" · "Compressed folder is invalid" · Interrupted ZIP download