"Hey, about 1.5/2 years ago, I compressed all my windows archives in a ultra compressed .7z archive. After formatting my computer and trying to uncompress it to put everything in its right place, it shows that the file is corrupted. There's any way to get back my precious 2 year old lost files? (I just want my stardew valley world back)." - Reddit user

Unfortunately, cases like this are all too common, where users trust ultra-compression to save space. In this case, there are several reliable methods and specialized tools available that can help fix the 7Z archive. In this guide, we’ll walk you through the most effective ways to repair 7Z files, including trusted software, step-by-step instructions, and tips for maximizing your chances of recovery.

Try It Free
Try It Free
In this article
    1. Try Latest Version Of 7-Zip
    2. Create Good Archive
    3. Corrupt Archive
    4. Recover the archive
    5. Parse Raw Stream For Recovered Solid Archive
    1. Repairit 7Z File Repair
    2. SysInfo ZIP Recovery
    3. DataNumen ZIP Repair

Part 1. What is 7z File and Common 7Z Corruption Types

A 7Z file is a highly compressed archive format created by the open-source utility 7-Zip. Known for compression ratio and strong AES-256 encryption, 7Z is a popular choice for archiving large files or backing up data. 7Z supports a wide variety of compression methods and can handle huge volumes of data.

A 7Z archive is made up of 4 main parts:

  • Start Header (32 bytes). This is the beginning of the file. It includes a signature (so software knows it's a 7Z file) and a pointer to where the End Header is located.
  • Compressed Data. This is the actual content of the files inside the archive, all squished down using compression (like LZMA) to save space.
  • Compressed Metadata Block. This part stores important details about the files, like their names, sizes, timestamps, CRC checks, and how they were compressed. It also tells the program how to find and extract the data.
  • End Header. This section contains a pointer that helps the program locate the Metadata Block.
icon note
Note: If the 7Z archive only has one file and it’s not encrypted, 7-Zip simplifies the structure by storing the file’s metadata directly in the End Header, without compression. In that case, the archive only has 3 main parts instead of 4.

Example: A file like a.7z (3740 bytes in size) could contain 5 smaller files, all compressed using the LZMA method.

7z structure

Here are two of the most frequent corruption errors users encounter:

Data Errors or CRC Errors for Files Inside the Archive

This occurs when the integrity check (Cyclic Redundancy Check or CRC) fails during extraction. It usually indicates that the data block containing a specific file is damaged. In many cases, you may still be able to extract some unaffected files.

"Cannot Open File 'a.7z' as Archive"

This more serious error suggests that the 7-Zip utility cannot even recognize the archive as a valid file format. This might be caused by incomplete downloads, abrupt system shutdowns, bad sectors on the disk, or corruption in the archive’s header.

In the next section, we'll explore a manual technique to fix 7z files. If you want the fastest solution, we also offer the best 7z file repair that you can use.

Part 2. How to Repair 7Z File Manually?

If 7-Zip can't open your archive, and repair tools don’t work, you can try fixing the file manually. This method involves using a hex editor to inspect and fix parts of the 7Z file structure. It takes a bit more effort, but it may help recover your important data.

1. Try Latest Version Of 7-Zip

Sometimes, using the latest version of 7-Zip can fix problems with broken 7Z files. So, try downloading and installing the newest version, even if it’s an alpha or beta release. After installing, try opening your archive again.

If that still doesn’t work, don’t worry, you can follow the steps in this guide for more advanced fixes.

What you'll need:

  • 7-Zip (latest version): Stable, beta, or alpha versions are all worth trying.
  • A hex editor/viewer: Something like FAR Manager can help you look inside the file if deeper repair is needed.

2. Create Good Archive

Let’s start by making a sample archive. We’ll use a file called readme.txt (1565 bytes), which comes from 7-Zip version 9.20.

First, we’ll create a few test archives from that file:

  • readme.txt.bz2
  • readme.zip
  • readme.txt.gzip
  • readme.txt.xz

Next, we’ll create a new 7Z archive called a.7z, using the LZMA compression method. This archive will include all the files listed above.

The final archive, a 7z, is 3740 bytes in size. You can open it in a hex editor to see its structure, which should match the standard layout of a 7Z file that we explained earlier.

3. Corrupt Archive

Now let’s create a damaged version of the a.7z archive by splitting it into two parts:

  • A.7z.001: This part includes the Start Header and the beginning of the Compressed Data.
  • A.7z.002: This contains the rest of the Compressed Data, plus the Metadata and End Header.

Together, the End Header and Metadata make up less than 300 bytes for our tiny test archive.

To split the file, we use the "Split file..." option in the 7-Zip File Manager. In the "Split to volumes, bytes:" field, we type 3000 100 G. This tells 7-Zip to make the first file 3000 bytes and allows the second file to be up to 100 GB (just to make sure there’s no size limit).

Now we have two parts:

  • a.7z.00.3000 bytes
  • a.7z.00.740 bytes

Next, we rename a.7z.001 to bad.7z and try to open it. 7-Zip shows the error:

"Cannot open file 'bad.7z' as archive", which means the file is now corrupted.

Try It Free
Try It Free

4. Recover the archive

We open the bad.7z file in a hex editor.

recover archive

We can confirm that the Start Header appears to be correct.

Based on the values from the Start Header fields, the expected archive size is calculated as:

0x0E5.0x2.0x2.0x0E9.3740 bytes.

Therefore, the correct size should be 3740 bytes. However, the file "bad.7z" is only 3000 bytes.

Next, we check the end of the archive:

end of the archive

We also can't find the End Header at the end of the archive. This suggests that the archive was likely cut off or is incomplete. Our next step is to create a new "good" 7z archive with a proper Start Header and End Header. We will then take the Compressed Data block from "bad.7z" and insert it into this new archive.

First, let's check where the Compressed Data block begins in the "bad.7z" file:

check bad 7z

If the archive uses the LZMA method, the compressed data will always start with a 00 byte, and the highest bit of the second byte will also be 0. This indicates that LZMA (not LZMA2) is probably being used if the first byte is 00 and the second byte is between 00 and 7F.

But if the first byte is anything other than 00, or if the second byte is higher than 7F, then it’s probably not an LZMA stream. It might be LZMA2 or even an AES-encrypted stream.

To recover the data, we need to create a new working 7z archive that uses the same compression method as bad.7z. This new archive also needs to be much bigger than bad.7z. To do this, we pick a large file. Sometimes, you can use bad.7z itself. In this case, we’ll use 7-zip.chm (which is 91,020 bytes). We rename it raw.dat and use the LZMA method with a large dictionary size to compress it into raw.7z. The dictionary size must be at least the same or bigger than what was used in bad.7z.

The result, raw.7z, is 84,898 bytes, which is larger than bad.7z as required. If it turns out to be smaller, you’ll need to pick an even bigger file and create a new raw.7z.

The "Split to volumes, bytes:" field is then set to 32 100G when we utilize the "Split file..." feature on bad.7z.

This creates two parts:

  • bad.7z.001 (32 bytes): contains the Start Header
  • bad.7z.002 (2,968 bytes): contains the start of the Compressed Data

We do the same with raw.7z, but this time we set it to 32 2968 100G. The 2968 bytes must match the size of bad.7z.002. When working with your own damaged archive, make sure to use the exact size of your bad. 7z.002.

This splits raw.7z into three parts:

  • raw.7z.001 (32 bytes): Start Header
  • raw.7z.002 (2,968 bytes): start of Compressed Data
  • raw.7z.003 (81,898 bytes): the rest of Compressed Data, Metadata Block, and End Header

We then replace raw.7z.002 with bad.7z.002 by renaming it.

Now the multi-part raw.7z. archive has correct headers from raw.7z and compressed data taken from bad.7z. Finally, we use the "Extract" option on raw.7z.001. It should extract the raw.dat file, but you may see a "Data Error" message. At this point, the recovered data stream from bad.7z will be in raw.dat.

Most 7z archives are solid, meaning all files are compressed together. The recovered stream will contain all of the original files if bad.7z was a solid file. If it wasn’t solid, the recovered stream will only contain one file, and there might also be some extra garbage data at the end.

5. Parse Raw Stream For Recovered Solid Archive

Now, we need to use a file parsing tool to scan raw.dat, look for file signatures, and try to extract any files it finds inside. You can use the parser included in 7-Zip for this. Make sure you have 7-Zip version 19.00 or newer.

Select "7-Zip > Open Archive > #" from the context menu after performing a right-click on raw.dat.

It will display:

parse raw stream

Click the Extract button to pull out these files. This way, we can recover some of the original files, but their original names won't be restored.

The 7-Zip parser can detect archives inside the raw file, but it might not recognize other types of files, like XML, HTML, JPG, PNG, and so on. So, you may need to use a different file recovery tool to extract those types of files from the raw file.

Part 3. Best 3 Tools to Fix 7Z file Automatically

If you find the manual method of fixing 7Z files too complicated, you can use specialized repair tools that do the hard work for you. These tools can help repair 7Z or ZIP files quickly and with minimal effort. Here are three reliable tools you can try:

1. Repairit 7Z File Repair

Repairit 7Z File Repair is an advanced yet easy-to-use tool that can repair 7Z archive files. If the archive was partially downloaded, improperly compressed, or affected by a virus, Repairit can help you restore the data inside without losing quality. It supports both personal and business users. This tool also offers a simple process where you can upload the corrupted file, scan it, and fix 7z content inside. Before saving the recovered files, you can preview them using the tool as well.

Key Features:

  • Fixes damaged, inaccessible, or incomplete 7Z files.
  • Throughout the repair process, keep your data intact.
  • Supports previewing the files before saving.
  • Interface that is easy to use and suitable for both inexperienced and seasoned users.

Here's how you can use Repairit to restore your files:​

Step 1. On the main interface, choose the "File Repair" option.​ Click the "Add" button to browse and select the corrupted 7z files. You can add multiple files of different formats at once.​

repairit add 7z file

Step 2. Click the "Repair" button to begin fixing the corrupted 7z files. Repairit will scan and repair the issues in each document.​ You can observe the repair progress for each file. If needed, you can cancel the process at any time.​

repairit click repair

Step 3. Click the "Preview" button next to any file to view its contents before saving. This ensures the repair was successful.​

repairit preview repaired 7z file
Try Repairit 7Z File Repair to Fix 7Z Files

article-safe-itemSecurity Verified. Over 7,302,189 people have downloaded it.

2. SysInfo ZIP Recovery

sysinfo zip repair

Data can be recovered from corrupt ZIP and 7Z archives using SysInfo ZIP Recovery, a flexible 7z file repair tool. It can repair 7z errors like invalid data, CRC errors, incomplete downloads, or unexpected file corruption. The tool supports repairing both standard and split archives, and it ensures that the folder structure, filenames, and original hierarchy are preserved.

Key Features:

  • Supports repairing severely corrupted ZIP and 7Z files.
  • Restores files while preserving original structure and names.
  • Works with large, password-protected, and split archives.
  • Provides a simple interface with an easy-to-follow repair wizard.

3. DataNumen ZIP Repair

datanumen zip repair

Drag-and-drop functionality is also supported by DataNumen ZIP Repair to facilitate file selection. It is known for its high recovery success rate and supports various scenarios, including incomplete archives, header corruption, and self-extracting ZIP files. The tool also includes a batch 7z repair feature. Drag-and-drop functionality is also supported by DataNumen ZIP Repair to facilitate file selection.

Key Features:

  • Repairs all types of ZIP and 7Z file damage, including severe cases.
  • Supports batch repair for multiple files simultaneously.
  • Can recover data from split and self-extracting archives.
  • Offers an intuitive drag-and-drop interface for user convenience.

Before You Go

Corrupted 7Z files can cause unnecessary stress, especially when they contain valuable data. But as you’ve seen, there are a variety of repair methods worth trying. It's always a good idea to back up your important files to avoid similar situations in the future. And if repair 7z attempts don't fully succeed, consider reaching out to data recovery experts for a second opinion.

Try It Free
Try It Free

FAQ

  • Can I just get some of the 7Z file back?
    Yes. If some data blocks are intact, 7-Zip may allow you to extract those files.
  • Is it safe to use third-party tools for 7Zip repair?
    Yes, but to prevent malware, only download from reliable sources.
  • Can WinRAR open and repair 7Z files?
    It can open some 7Z files, but doesn't support advanced repair for them. Stick with 7-Zip or a dedicated tool.
Amy Dennis
Amy Dennis Jun 16, 25
Share article:
logo
Repairit – AI Photo Repair

Revive damaged memories in 3 steps

open
logo
Repairit – AI Photo Repair

Revive damaged memories in 3 steps

open