How to Use 7-Zip: Zip, Extract, Password-Protect and Command Line
How to Use 7-Zip: The Complete Step-by-Step Guide
To use 7-Zip, install it from 7-zip.org, then right-click any file or folder and open the 7-Zip submenu: "Add to archive..." creates a 7z or ZIP, and "Extract to" unpacks one. That covers 90% of what people need. This guide on how to use 7-Zip walks through both, then the parts most tutorials skip: AES-256 passwords that also hide file names, splitting a big archive into parts, and a 7zip command line cheat sheet.
7-Zip is free, open source and Windows-first. The Mac situation is different, and covered near the end.
Step 1: Download and Install 7-Zip
Only download 7-Zip from 7-zip.org. It is a popular target for lookalike sites that wrap the installer in adware. The official page lists installers for 64-bit Windows (x64), 32-bit Windows and Windows on ARM64, plus MSI packages for IT deployment. The site itself recommends the .exe installer over the .msi for normal use.
- Go to 7-zip.org and download the build that matches your PC. Most modern Windows machines want 64-bit x64; Surface and Snapdragon laptops want ARM64.
- Run the installer and keep the default folder,
C:\Program Files\7-Zip. - Click Install. No restart, no account, no trial.
If you prefer a package manager, winget install 7zip.7zip installs the same official build.
Keep it updated. Archive tools parse untrusted files, so they get security fixes. The 26.x series has shipped several, including a fix in 26.03 for archives that could drop Windows' Mark-of-the-Web warning on extracted files. Use version 26.03 or later.
Do you still need 7-Zip on Windows 11?
Recent Windows 11 builds can open 7z, RAR and TAR natively, and newer builds can create 7z and TAR from Compress to in File Explorer. What the built-in tool does not do is password protection or splitting into volumes. If you need either, or you want the full set of compression settings, 7-Zip is still the tool.
The Windows 11 Right-Click Menu: Where 7-Zip Went
On Windows 11, right-clicking a file shows a shortened menu, and 7-Zip is not in it. Official 7-Zip registers in the classic context menu, so:
- Click Show more options at the bottom of the menu, or
- Press Shift+F10 with the file selected to jump straight to the classic menu.
Then hover 7-Zip to see its submenu. As of the 26.x releases, 7-Zip has not added support for Windows 11's new compact menu. You can trim what appears in its submenu under Tools → Options → 7-Zip in 7-Zip File Manager (untick items you never use, or turn off "Cascaded context menu" to put them at the top level of the classic menu).
If the extra click bothers you, NanaZip is a 7-Zip fork that does integrate with the modern menu. See NanaZip vs PeaZip for how it compares.
How to Zip Files with 7-Zip
There are two routes: one click for a default archive, or the full dialog when you care about the settings.
The quick way
- Select the files or folder in File Explorer.
- Right-click → Show more options → 7-Zip.
- Choose Add to "name.zip" or Add to "name.7z".
The archive appears next to the originals, using Normal compression. Pick .zip when you are sending it to someone who may not have 7-Zip, since every operating system opens ZIP. Pick .7z when it is for you or for people who already use an archiver; it is usually noticeably smaller. Our 7z vs ZIP benchmarks measure the difference.
The full "Add to archive" dialog
Choose Add to archive... instead and you get every option. The fields worth knowing:
| Field | What it does | Sensible default |
|---|---|---|
| Archive format | 7z, zip, tar, gzip, bzip2, xz, wim | 7z for yourself, zip for others |
| Compression level | Store, Fastest, Fast, Normal, Maximum, Ultra | Normal |
| Compression method | LZMA2 (7z default), Deflate (ZIP default), PPMd, BZip2 | Leave it |
| Dictionary size | How far back the compressor looks for repeats; bigger = better ratio, more RAM | Leave it |
| Solid block size | Compresses many files as one stream (7z only) | Leave it |
| Split to volumes, bytes | Breaks the archive into fixed-size parts | Blank unless you need it |
| Encryption | Password, method (AES-256 or ZipCrypto), Encrypt file names | See below |
| Delete files after compression | Removes originals once the archive is built | Off |
Normal is the right compression level for nearly everything. Ultra costs a lot more time and memory for a few percent. If you want the numbers behind that, 7-Zip compression ratio breaks down what each level and dictionary size actually buys, so we will not repeat it here.
Click OK and 7-Zip shows a progress window with the speed and the running compression ratio.
How to Extract Files with 7-Zip
Right-click the archive → Show more options → 7-Zip, then:
- Extract to "name\" — unpacks into a new folder named after the archive. Use this by default. It keeps a 400-file archive from scattering across your Downloads folder.
- Extract Here — unpacks beside the archive. Fine when you know it contains a single file or a single top-level folder.
- Extract files... — opens a dialog to choose the destination, how to handle existing files, and to enter a password.
- Open archive — browses the contents in 7-Zip File Manager without extracting, so you can pull out one file by dragging it out.
- Test archive — checks every file's checksum without writing anything. Worth running on a big download before you delete the original.
7-Zip extracts far more than it creates: RAR, ISO, DMG, TAR, GZ, XZ, CAB, WIM and dozens of others. For RAR specifically it is the free alternative to WinRAR; 7-Zip vs WinRAR covers the trade-offs.
Encrypted archive? 7-Zip prompts for the password when you extract. If file names are hidden, it prompts as soon as you open the archive.
How to Password-Protect an Archive with 7-Zip
In Add to archive..., look at the Encryption section on the right:
- Type the password in Enter password and again in Reenter password.
- Encryption method: a 7z archive always uses AES-256. A ZIP lets you choose AES-256 or ZipCrypto.
- Tick Encrypt file names (7z only).
- Click OK.
Two details decide whether this is real protection:
Use 7z with "Encrypt file names" for anything sensitive. Without it, anyone can open the archive and read the full file list ("Q3_layoffs.xlsx" leaks plenty on its own) even though they cannot open the files. ZIP has no equivalent; file names are always visible.
ZipCrypto is weak; AES-256 ZIPs are less compatible. ZipCrypto is the legacy ZIP scheme and should not be relied on. AES-256 in a ZIP is strong, but some built-in unzip tools only understand ZipCrypto, so the recipient may need 7-Zip, WinZip or a similar app. If you control both ends, skip the dilemma and send a 7z.
Encryption is only as good as the password. A long passphrase beats a short complex one, and send it through a different channel from the archive.
How to Split a Large Archive into Parts
Splitting is how you get a 12 GB folder onto a FAT32 USB stick (4 GB per-file limit), through an upload form with a size cap, or across several emails.
- In Add to archive..., find Split to volumes, bytes.
- Pick a preset from the dropdown or type your own size with a unit:
500M,2G,4000M. A number with no unit is read as bytes. - Click OK.
7-Zip writes name.7z.001, name.7z.002 and so on. To extract, put every part in the same folder and extract the .001 file. 7-Zip reads the rest in order. One missing part breaks the extraction from that point on.
Split archives cannot be updated later, so build them last, after the contents are final. If your goal is an upload limit, check the actual cap first; our sibling guide to the Dropbox file size limit is one example where the right answer depends on how you upload.
7zip Command Line: Cheat Sheet
Everything above is available from the 7zip command line, which is what you want for scripts, scheduled backups and servers. The syntax is:
7z <command> [switches] <archive_name> [files]
On Windows the executable is C:\Program Files\7-Zip\7z.exe. The installer does not add it to PATH, so either add that folder to your PATH or call the full path. On Linux and macOS the official 7-Zip console binary is named 7zz; the older 7z/7za from the p7zip project is an unmaintained fork based on 16.02.
Commands
| Command | What it does | Example |
|---|---|---|
a | Add files to an archive (creates it if needed) | 7z a backup.7z Documents\ |
x | Extract with full folder structure | 7z x backup.7z -oRestore |
e | Extract everything into one folder, flattening paths | 7z e photos.zip -oAll |
l | List contents | 7z l backup.7z |
t | Test integrity | 7z t backup.7z |
u | Update changed files in an existing archive | 7z u backup.7z Documents\ |
d | Delete files from an archive | 7z d backup.7z old.log |
Use x, not e, unless you specifically want a flat dump. e throws away folders, so two files called notes.txt in different subfolders will collide.
Switches you will actually use
| Switch | Meaning | Example |
|---|---|---|
-t{type} | Archive format | -tzip, -t7z (default) |
-mx{0-9} | Compression level: 0 store, 1 fastest, 5 normal (default), 9 ultra | -mx9 |
-p | Password; with no value, 7-Zip prompts for it | -p or -pSecret |
-mhe=on | Encrypt headers (hides file names; 7z only) | -mhe=on |
-v{size}{b,k,m,g} | Split into volumes of that size | -v2g |
-o{dir} | Output folder for extraction. No space after -o. | -oD:\Out |
-r | Recurse into subfolders when using wildcards | -r |
-y | Answer yes to all prompts (overwrite) | -y |
Copy-paste recipes
# Make a ZIP anyone can open
7z a -tzip report.zip report\
# Maximum compression 7z
7z a -mx9 archive.7z project\
# Encrypted 7z with hidden file names (prompts for password)
7z a -p -mhe=on private.7z Finance\
# Split into 2 GB parts
7z a -v2g bigfolder.7z BigFolder\
# Extract into a named folder, overwrite without asking
7z x archive.7z -oC:\Restore -y
# Extract a split archive
7z x bigfolder.7z.001
Prefer bare -p over -pSecret. Typing the password into the command puts it in your shell history and in the process list where other users can see it. Bare -p prompts instead.
How to Use 7-Zip on a Mac
There is no official 7-Zip app for macOS with a window and buttons. What 7-zip.org does publish is a macOS console build (Apple Silicon and Intel), the same 7zz command-line tool used on Linux. The easiest way to install it is Homebrew:
brew install sevenzip
7zz a archive.7z Folder/
7zz x archive.7z
Every command and switch in the cheat sheet above works the same, just with 7zz instead of 7z.
If you would rather not use Terminal, use a Mac-native app. Keka creates and extracts 7z (including encrypted and split archives), and The Unarchiver is a free extract-only tool. Keka vs The Unarchiver compares them, and our guide to extracting 7z files on Mac walks through opening .7z archives step by step.
What 7-Zip Will Not Shrink
The most common disappointment with 7-Zip: you zip a folder of videos and it comes out almost the same size.
That is expected. MP4, MOV, JPEG, HEIC, MP3 and image-heavy PDFs are already compressed by their own codecs. A general-purpose archiver looks for repeated patterns, and the codec already removed them. Text, code, logs and spreadsheets shrink dramatically in 7-Zip; finished media barely moves, at any compression level.
So if a 3 GB folder of screen recordings needs to be 800 MB, no archive setting gets you there. The size reduction has to come from re-encoding the media itself: lower bitrate, a more efficient codec such as H.265, or a lower resolution. How to compress MP4 covers what each of those trades away. Then, if you still want a single file to send, zip the smaller results with 7-Zip.
Shrink the Media First, Then Archive
Compresto does the re-encoding half on macOS. Drop in a folder of videos, images, GIFs or PDFs, choose a quality level, and it compresses the whole batch with hardware acceleration, typically cutting media far more than any archiver can. It does not create archives; once your files are smaller, zip them with 7-Zip, Keka or Finder's built-in Compress.
Frequently Asked Questions
How do I use 7-Zip to zip files?
Select the files, right-click, open 7-Zip (under Show more options on Windows 11), and choose Add to "name.zip" for a quick ZIP or Add to archive... to set the format, level, password and split size.
How do I extract files with 7-Zip?
Right-click the archive → 7-Zip → Extract to "name\". That unpacks into a new folder. For multi-part archives, keep all parts together and extract the .001 file.
Where is 7-Zip in the Windows 11 right-click menu?
Under Show more options (or press Shift+F10). Official 7-Zip only registers in the classic menu. NanaZip, a fork, integrates with the new compact menu.
Is 7-Zip safe to download?
Yes, from 7-zip.org. Avoid third-party download sites, and keep it updated: recent 26.x releases fixed several security vulnerabilities.
How do I password-protect a file with 7-Zip?
In Add to archive..., enter a password, keep the 7z format (AES-256), and tick Encrypt file names. ZIP can use AES-256 but cannot hide file names.
What is the 7zip command line syntax?
7z <command> [switches] <archive> [files]. Use a to add, x to extract with folders, l to list and t to test. -p -mhe=on encrypts with hidden names; -v2g splits into 2 GB parts.
Is there 7-Zip for Mac?
Only the official command-line build, 7zz, installable with brew install sevenzip. For a graphical app, use Keka or The Unarchiver.
Why didn't 7-Zip make my videos smaller?
They are already compressed. Archiving cannot remove redundancy the codec already removed. Re-encode the video to shrink it, then archive if you need one file.