7z file format
.7z · archive+compression · introduced 1999 by Igor Pavlov
What is a 7z file?
7z is the native format of the open-source 7-Zip archiver, designed by Igor Pavlov in 1999. It uses the LZMA family of algorithms and almost always produces smaller files than ZIP or RAR. 7z supports solid compression, where many files are compressed as one continuous stream, and AES-256 encryption with optional filename hiding.
Most readers reach this page after double-clicking a .7z file and finding their operating system unsure what to do with it. The good news: 7z is a well-understood format with mature tooling on every major platform. It is supported in one click by mainstream archivers on Windows, macOS, and Linux.
How to extract a 7z file
Opening a .7z file is straightforward on every modern operating system. The exact steps depend on which platform you are on:
On Windows
- Locate the
.7zfile in File Explorer. - Right-click the file. If you have 7-Zip installed, choose 7-Zip → Extract Here. On Windows 11 the built-in extractor handles ZIP, 7z, RAR and several other formats directly through Extract All…
- If prompted, pick a destination folder and click Extract.
- The extracted files appear in a folder next to the original archive.
On macOS
- Find the
.7zfile in Finder. - Install The Unarchiver from the Mac App Store, or Keka for both creating and extracting.
- Right-click the file → Open With → The Unarchiver (or just double-click after Unarchiver is set as the default).
- The extracted folder appears next to the archive.
On Linux
- Use your file manager: right-click the archive → Extract Here (file-roller on GNOME, Ark on KDE).
- On the command line, run one of:
7z x archive.7z
- The files appear in the current directory.
How to create a 7z file
To pack files into a .7z archive, you typically need an archiver that supports writing this format. Not every tool can create every format — for example, only WinRAR can create real RAR files. The sidebar lists the software known to read and write 7z.
On the command line, the canonical create command is:
7z a archive.7z folder/
If you regularly create archives at scale, a dedicated archive automation suite can wrap this command in scheduled jobs, integrity checks, and offsite replication.
Strengths
- Best-in-class general compression
- Open format and reference implementation
- AES-256 with header encryption
- Solid mode
Weaknesses and limitations
- Slower compression than ZIP
- Not built into Windows until Windows 11
- No recovery records
Typical use cases
- Maximum compression for distribution
- Software installers (NSIS, Inno Setup payloads)
- Encrypted archives
- Backup of source trees
Technical details
7z uses the LZMA / LZMA2 (also BZIP2, PPMd, DEFLATE) algorithm and is identified on disk by the magic byte sequence 37 7A BC AF 27 1C. The standard MIME type is application/x-7z-compressed. The format is an open specification and is free for any use.
Frequently asked questions
Is 7z safe to open?
Archive files are containers — they are only as safe as what they contain. A .7z from a trusted source is fine; one received from a stranger can hold malicious executables, scripts, or files engineered to exploit bugs in your archiver. Always keep your archiver updated, and never run unknown executables that come out of an archive. A safe workflow is to extract into a sandbox and scan the contents before opening anything.
What is the maximum file size?
The 7z format supports archives up to 16 exabytes and is rarely the limiting factor in real-world use.
Can I password-protect a 7z?
Yes. 7z supports password protection with AES-256 encryption in modern archivers like 7-Zip, WinRAR, and PeaZip. Avoid the legacy ZipCrypto algorithm — it has been broken for years.
How does 7z compare to other formats?
See our format comparison pages such as ZIP vs 7z, ZIP vs RAR, and tar.gz vs tar.xz for side-by-side feature tables.