7-Zip says Cannot open file as archive when the file lacks the structure of a valid ZIP, RAR, or other supported format. Corrupted or incomplete downloads cause it. You may also see Headers Error, Unexpected end of data, or There are some data after the end of the payload data. Each points to a specific type of damage, and the fix depends on which one you see. Here is what each message means and how to recover your data.

What “Cannot Open File as Archive” Really Means

7-Zip checks two things when you open an archive: the file header signatures and the structure of the end-of-archive record. The most common reason for this error is that the file is not a valid archive at all, or that its end record is missing or damaged. A ZIP file must begin with a local file header signature (bytes 50 4B 03 04) and end with an end record that is at least 22 bytes long. If either of these is absent or corrupted, 7-Zip will refuse to open the file. Other archive formats have similar structural requirements.

Decoding 7-Zip Error Messages

7-Zip produces several distinct error messages depending on the nature of the corruption. Here is what each tells you about the damage.

Headers Error

7-Zip found a local file header or end-record entry whose signature or fields are invalid. This happens when file header bytes have been overwritten or truncated. The archive may still contain recoverable data if the file data itself is intact.

Unexpected end of data

The file ends before the archive does. This is typical of a truncated download or an interrupted copy. The end record is missing, so7-Zip cannot locate the file listing. However, because each file inside a ZIP has its own local header, you can recover entries by scanning even when the end record is gone.

There are some data after the end of the payload data

Extra bytes follow the archive data. This often happens if a user appended data to the ZIP file, or if the file was concatenated with another file. In most cases, the files inside the archive are still extractable, and7-Zip will let you proceed. The warning does not mean the archive is broken; it only alerts you to the trailing data.

Data Error or CRC Failed

The problem is inside a specific file in the archive. The stored CRC-32 checksum for that file does not match the checksum computed from the extracted data. The compressed data for that entry is corrupted. Other files in the same archive may extract without issue.

7-Zip is not archive

This is a variation of the main error. The file either has an unknown format or its header is so damaged that7-Zip cannot identify it as any known archive type. This is common with files that have been renamed or whose first few bytes were overwritten.

Test the Archive Before Extracting

Before trying to extract files, use7-Zip's Test command to check every entry without extracting anything. In7-Zip File Manager, select the archive and click Test on the toolbar.7-Zip will read each file and verify its CRC-32 checksum. The test output lists any errors it finds, such as Data Error or CRC Failed, and tells you which specific file is damaged. You then know what you are dealing with before you attempt a recovery.

Fix Each Type of Error

The fix for a broken ZIP file depends on the error message you see. Follow the steps that match your situation.

For “Headers Error” or “7-Zip is not archive”

  1. Make a copy of the corrupted file so you do not lose the original.
  2. Open the file in a hex editor and check the first two bytes. They should be 50 4B for a ZIP file. If they are not, the file may have been renamed or its header overwritten. Try renaming the file extension to .zip if it is not already.
  3. If the header bytes are missing or damaged, use a ZIP repair tool that scans for local file headers (signature 50 4B 03 04) and rebuilds the end record from them.

For “Unexpected end of data”

  1. Check the file size. If the download or copy was interrupted, try to obtain the full file again from the original source.
  2. If re-downloading is not possible, use a repair tool that can scan for local file headers and recover any complete entries. Because each file inside a ZIP has its own local header, entries can be recovered by scanning even when the end record is missing.

For “Data Error” or “CRC Failed”

  1. Extract all files except the one that failed.7-Zip will usually extract the rest of the archive without issue.
  2. If the damaged file is essential, salvage partial data by using a tool that extracts raw data without CRC verification. Some repair utilities can ignore the checksum and extract whatever is there.

For “There are some data after the end of the payload data”

  • This is not an error that requires fixing. Extract the archive normally. If you want to remove the trailing data, recompress the extracted files into a new archive.

Recover Files When the End Record is Missing

When the end record is missing,7-Zip cannot display the file list, but the file data may still be present. Because each file inside a ZIP has its own local header, you can recover entries by scanning for the local file header signature 50 4B 03 04. A repair tool can scan the entire file, locate each local header, and rebuild the end record from them. This method works even if the file was truncated, as long as enough of each file entry remains intact.

When to Use an Online Repair Service

If7-Zip cannot open the file and you have tried the steps above without success, an online repair service may recover your data. Zip.repair is one such option that processes corrupted ZIP files and attempts to extract the contents. This is useful when the file has multiple errors or when you do not have access to specialized repair software.