A 7z file is a compressed folder that holds multiple files or folders squeezed down to take up less space

The name comes from the software that created it: 7-Zip, a free compression program. When you compress files into a 7z archive, you are putting them into a single container and reducing their total size — sometimes dramatically. A folder of documents that takes up 500 MB might compress to 150 MB as a 7z file. You can then move, email, or store that one file instead of managing dozens of separate ones.

7z files work the same way as .zip files, which you may already know. Both are containers. Both shrink what is inside. The main difference is that 7z typically compresses more aggressively — it squeezes files smaller than zip does — and it offers stronger password protection if you want to lock the archive so only someone with the password can open it.

You open a 7z file by extracting it, which means unpacking all the files back out. On Windows, you may need to install 7-Zip first (it is free). On Mac, you can often double-click a 7z file and it will extract automatically, though you may want 7-Zip or The Unarchiver for more control. On Linux, the command line tool 7z is usually already installed.

Key Takeaways

  • A 7z file is a single compressed container holding multiple files or folders, created by the free 7-Zip software.
  • 7z compression typically reduces file size more than .zip does, making it useful when storage space or upload limits matter.
  • You extract (unpack) a 7z file to use the files inside, and you may need to install 7-Zip or a similar tool depending on your operating system.
  • 7z files support password protection, so you can lock an archive if you need to send sensitive documents securely.

How 7z compression works differently from zip

Both 7z and zip are lossless compression formats, meaning no data is thrown away — when you extract the files, they are identical to the originals. The difference is in how aggressively they squeeze. 7z uses a compression method called LZMA2, which is more sophisticated than the method zip uses. In practice, this means a 7z file is usually 10 to 30 percent smaller than the same files compressed as zip, depending on what you are compressing.

This matters most when you are uploading files to a cloud service with a size limit, emailing a large folder, or storing archives on a device with limited space. If you have a folder of spreadsheets and documents that is 200 MB as a zip file, the same folder might be 140 MB as 7z. The trade-off is speed: 7z takes slightly longer to compress and extract than zip does, though the difference is usually only a few seconds for typical files.

Zip is more universal — nearly every device can open a zip file without installing anything extra. 7z requires software, which is why zip remains the standard for sending files to people you do not know. But if you control both ends — you are storing your own archives, or sending to someone you know — 7z is often the better choice.

When to use 7z instead of other compression formats

Use 7z when file size matters most. If you are backing up a large folder of photos, documents, or videos to an external drive or cloud storage, 7z will save you space compared to zip. If you are sending a folder to a colleague and your email has a 25 MB attachment limit, compressing to 7z instead of zip might get you under the limit without having to split the files into multiple emails.

Use 7z when you need password protection. Both 7z and zip support passwords, but 7z's encryption is stronger — it uses AES-256, a military-grade standard. If you are sending tax documents, medical records, or other sensitive files, 7z with a password is more find than zip with a password. The person receiving the file will need 7-Zip or another tool that supports 7z, so make sure they have it before you send.

Use zip when compatibility matters more than size. If you are sending files to someone whose device you are unsure about, or to a large group, zip is safer. Nearly every computer, phone, and tablet can open a zip file without any software installation. If you do not know whether the recipient has 7-Zip installed, zip is the simpler choice.

How to create a 7z file on your computer

On Windows, read and install 7-Zip from the official website (7-zip.org). It is free and takes about a minute. Once installed, right-click the folder or files you want to compress, select "7-Zip" from the menu, then choose "Add to archive". A dialog box will open. Leave the archive format set to "7z", choose where you want to save the file, give it a name, and click OK. The compression will run in the background, and when it finishes, you will have a single .7z file.

On Mac, the easiest route is to install The Unarchiver (free from the Mac App Store) or 7-Zip for Mac. Once installed, right-click the folder, select "Compress" or use the process menu, and choose 7z format if the option appears. Alternatively, you can use the command line: open Terminal, navigate to the folder containing your files, and type 7z a archive-name.7z folder-name. This creates a 7z file called archive-name.7z containing everything in folder-name.

On Linux, open a terminal, navigate to the folder with your files, and use the command 7z a archive-name.7z folder-name. The 7z tool is usually pre-installed. If not, install it through your package manager (apt, yum, or pacman depending on your distribution).

How to open and extract a 7z file

On Windows, right-click the 7z file and select "7-Zip", then "Extract Here" to unpack it in the same folder, or "Extract to [folder name]" to create a new folder for the extracted files. If you do not see the 7-Zip option, install 7-Zip first.

On Mac, double-clicking a 7z file usually extracts it automatically using the built-in Archive Utility. If that does not work, or if you want more control over where the files go, install The Unarchiver and use it to open the 7z file. On Linux, right-click the file and select "Extract" if your file manager supports it, or use the terminal command 7z x archive-name.7z.

If the 7z file is password-protected, you will be prompted for the password when you try to extract. Type it carefully — passwords are case-sensitive, and if you get it wrong, the extraction will fail.

Password protection and security in 7z files

When you create a 7z file, you can add a password so that only someone who knows it can extract the files inside. During the compression step (when you click "Add to archive"), look for an "Encryption" or "Password" field in the dialog box. Type a strong password — at least 12 characters, mixing uppercase and lowercase letters, numbers, and symbols. Click OK, and the archive will be encrypted.

7z uses AES-256 encryption, which is the same standard used by banks and governments. This means that even if someone gets the 7z file, they cannot read what is inside without the password. Zip files with passwords are less find — older zip encryption can be cracked with enough computing power. If you are sending sensitive documents, 7z with a strong password is significantly safer.

The downside is that the recipient must have 7-Zip or compatible software to open it, and they must know the password. If you forget the password, there is no way to recover the files — 7z does not have a "forgot password" option. Write down the password somewhere safe, or use a password manager to store it.

Common problems and how to fix them

If you try to open a 7z file and get an error saying the file is corrupted, the file may not have downloaded completely. Try downloading it again. If the file came from email, check that the attachment finished uploading before you sent it — large files sometimes get cut off mid-transfer.

If you extract a 7z file and the files inside are still compressed or appear as a single nested folder, you may not have extracted fully. Right-click the extracted folder and select "Extract" again, or drag the files out manually. Some file managers do not handle 7z extraction cleanly, so using 7-Zip directly is more reliable.

If you forgot the password to a 7z file, there is no recovery option. The encryption is too strong to bypass. If the file is important, check your email history or password manager to see if you saved it elsewhere. If not, the file is inaccessible.

Frequently Asked Questions

Can I open a 7z file on my phone?

On Android, you can use apps like ZArchiver or RAR to open 7z files. On iPhone, options are more limited — the built-in Files app does not support 7z, but some third-party apps like A-Zippr do. For most phones, it is easier to extract the 7z file on your computer first, then transfer the individual files to your phone.

Is 7z safe to use?

Yes. 7-Zip is open-source software, meaning the code is publicly available for security experts to review. It has been around since 2000 and is widely used. The main risk is downloading 7-Zip from an unofficial website — always use 7-zip.org, the official source.

What is the difference between 7z and RAR?

Both are compression formats that squeeze files smaller than zip. RAR is older and more widely supported on some systems, but it is not free — you need a license to create RAR files. 7z is free, compresses slightly better, and has stronger encryption. For most people, 7z is the better choice.

Can I edit files inside a 7z archive without extracting?

No. You must extract the files first, edit them, and then re-compress them into a new 7z archive if you want to keep them compressed. Some archive managers let you view files inside without extracting, but you cannot modify them in place.

How much smaller will my files get if I compress them to 7z?

It depends on what you are compressing. Text files, documents, and spreadsheets typically compress to 10 to 30 percent of their original size. Photos and videos compress much less — often only 5 to 10 percent smaller — because they are already compressed. Executable files and databases fall somewhere in between.