Archive

Fix "Cannot open file as archive" Error in 7-Zip and WinRAR

Error message: Cannot open file as archive

Fix “Cannot open file as archive” Error in 7-Zip and WinRAR

Cannot open file as archive is 7-Zip’s signal that it could not read the archive’s header — the small block at the start (and sometimes the end) of the file that tells the tool what’s inside and where to find it. Without a readable header, no extraction is possible, even if the file’s data is otherwise intact. The good news: in most cases the data really is intact, the header is the only thing wrong, and the file can be salvaged. This guide diagnoses the cause and walks the fixes in order.

Quick fix

The first three checks resolve the majority of cases:

  1. Re-download or re-copy the file. Header corruption is overwhelmingly caused by truncation — the file is shorter than it should be because the download stopped early or the copy was interrupted. Compare the file size to the source if you can; even a small shortfall is enough to break the header. Re-downloading from the original source, ideally through a download manager that supports resume, is the single most likely fix.
  2. For split archives, open the first volume only. If your file is part of a split set (named archive.zip.001 and archive.zip.002, or archive.part1.rar and archive.part2.rar), open the first volume — never any other part. The first volume contains the headers; later volumes are continuation data and produce the “cannot open as archive” error if opened directly. Make sure every part of the set is in the same folder before extracting.
  3. Try a different tool. If 7-Zip refused the file, try WinRAR or PeaZip. If WinRAR refused it, try 7-Zip. The tools have different parsers and different tolerance for header damage; one will often read what the other won’t.

If the file is fully downloaded, you have all the volumes, and no tool will open it, the header is genuinely damaged and you’ll need a real repair attempt.

If that didn’t work

Run 7-Zip from the command line for better diagnostics. The GUI gives you one terse error; the CLI tells you what part of the structure failed. Open a terminal (Command Prompt or PowerShell on Windows; Terminal on macOS or Linux) and run:

7z t archive.7z

This is the test command — it tries to read and verify the archive without extracting anything. The output will identify whether the Start Header is missing, the End Header offset is wrong, the file is too short, or whether 7-Zip reached the data and found a CRC mismatch. Each of these points to a different fix path. Running 7z l archive.7z lists the archive contents (when it can) and is similarly useful for diagnostics.

Try opening explicitly as a different format. Sometimes a file with a .zip extension is actually a RAR archive, or a .7z file is genuinely a renamed installer. In WinRAR, use File → Open Archive and the Files of type dropdown to force the format. In 7-Zip, the File Manager (7zFM.exe) lets you browse to the file and open it regardless of extension. To confirm what the file actually is, on macOS or Linux run file archive.7z in a terminal — the output identifies the real format. On Windows, open the file in any hex viewer and check the first few bytes: PK indicates ZIP, Rar! indicates RAR, and 7z (followed by binary) indicates 7-Zip.

Use WinRAR’s “Repair archive” feature. Open WinRAR, navigate to the archive in its file pane, then Tools → Repair archive. WinRAR writes a new file (typically prefixed _reconstruct. or rebuilt.) with whatever structure it can reconstruct from the data. For files with damaged headers but intact body data, this is often enough to recover usable contents. The repair is most effective when the archive was created with recovery records (-rr switch on creation); without them, partial recovery is the realistic outcome.

Check the Windows right-click handler if the CLI works but double-clicking doesn’t. Some 7-Zip installations end up with the file association pointing to 7zG.exe (the GUI extractor) instead of 7zFM.exe (the file manager), which can cause double-click to fail with this error on otherwise-fine archives. If 7z t archive.7z from the command line works but the right-click “Open archive” fails, check the file association. In 7-Zip’s options (Tools → Options → System), confirm the right-click integration is associating archives with the file manager binary.

Advanced recovery

For 7z files specifically, the official 7-Zip recovery documentation describes a hex-editor procedure for reconstructing a damaged Start Header. The Start Header occupies bytes 0–31 of the file, with a fixed signature (37 7A BC AF 27 1C) and a 4-byte CRC over the following 20 bytes. By comparing a damaged file to a known-good archive of the same vintage, the structural fields can sometimes be reconstructed manually. This is a power-user technique — the recovery page documents it in full detail with worked examples — but for users comfortable with hex editors, it can salvage files no GUI tool will touch.

When the archive contains many files and a few are critical, accept partial recovery. WinRAR’s extraction dialog has a Keep broken files option under Miscellaneous; with it enabled, files that fail their CRC check are kept on disk in their partial form rather than discarded. The salvaged files may be incomplete but are sometimes usable — text files might lose their last few lines, image files might display partially, document files might open with some pages missing. For an archive where any data recovery is better than none, this is the right choice.

If the file is critical and none of the above worked, commercial repair tools (DiskInternals ZIP Repair, Stellar Repair for ZIP, Recoverit) automate the same techniques 7-Zip and WinRAR offer, sometimes with more aggressive pattern-matching for genuinely scrambled headers. They cannot recover bytes that aren’t in the file, but they can occasionally reconstruct what manual tools give up on. For a one-off urgent recovery the modest licence fee is reasonable; for repeat use, the techniques are well-documented and free tools cover the same ground.

Why this happens

The archive header is the tool’s table of contents — without it, the data is unreachable even when it’s fully present. Three conditions account for the overwhelming majority of header failures:

The file is truncated. Headers in 7z and ZIP formats reference offsets at the end of the file (the End Header for 7z; the central directory record for ZIP). If the file ends earlier than the writer expected, those offsets point past the file’s actual length and parsing fails immediately. Interrupted downloads, mail gateway truncation, and partial copies are the dominant causes. The file size alone reveals this — comparison against the source file size confirms it in seconds.

The file is a continuation volume of a split archive. Multi-part archives are designed to be opened from the first volume, which contains the structural metadata for the whole set. Opening volume 2 directly produces this error because volume 2 is just continuation data with no header of its own. Operating systems sometimes hide the .001 extension or sort volumes confusingly, leading users to double-click the wrong file.

The file is in a different format than its extension claims. A .zip that’s really a RAR, a .7z that’s really a self-extracting executable saved with the wrong extension, an installer renamed to look like an archive — all produce this error from a tool that parsed the file expecting one structure. The file command identifies the real format, after which renaming the file or opening it with the appropriate tool resolves the issue.

Genuine in-file header corruption — bytes scrambled inside the header by storage media errors, transit damage on connections without TCP integrity, or filesystem-level damage — is real but uncommon. It’s the cause to suspect when the file size is correct, all volumes are present, the format matches the extension, and multiple tools all fail in the same way.

Preventing this in future

Verify file integrity at the source. Many download providers publish SHA-256 or MD5 checksums alongside their files. Computing the local hash and comparing it to the published value confirms the file arrived intact in seconds — far faster than discovering hours later that an archive is corrupt and re-downloading it.

For your own archives, add recovery records when creating important ones. WinRAR’s Add recovery record checkbox (or the -rr5p CLI option for a 5% recovery margin) trades a small size increase for the ability to repair small areas of damage automatically. For 7-Zip users, the format itself does not support recovery records, but external parity tools (par2, MultiPar) provide the same protection by generating separate recovery files alongside the archive.

For large transfers, prefer dedicated download managers over browsers. Browsers handle interrupted downloads inconsistently, and a download that displays as “complete” can still be silently truncated. Tools like JDownloader, Free Download Manager, or aria2c on the command line resume reliably and report mismatches against expected sizes.

If your error wording is slightly different — “The archive is either in unknown format or damaged” — see that error’s specific guide, which covers the same family of header failures from a different angle. If the archive opens successfully but extraction stops partway with CRC errors, the problem is data corruption rather than a header one; see extraction fails partway. For 7z files specifically that won’t extract, 7z won’t extract covers format-specific issues. For the broader picture of archive repair across formats and tools, the archive repair complete guide is the category pillar.

Last verified: April 2026