To password protect a ZIP file, use an archiver that encrypts with AES-256. On Windows that means the free 7-Zip, and on a Mac a 7-Zip-compatible app such as Keka. Windows 11 and macOS can both make archives without extra software, but neither built-in tool gives you a strong password. Once the file is locked, send the password by a different route than the file itself.
This guide covers each step for Windows, Mac and Linux. It also explains the part most guides skip: ZIP has two encryption methods, and only one of them really protects your files. Everything here was checked November 21, 2026.
Quick answer: how to password protect a ZIP file
- Install 7-Zip from 7-zip.org. The current version is 26.06, released November 6, 2026. On a Mac, use Keka or another 7-Zip-compatible app.
- Right-click the files or folder and choose 7-Zip > Add to archive.
- Pick the format: 7z if the file names should stay hidden, ZIP if the recipient needs a plain ZIP.
- Enter a long, unique password.
- Set the encryption method to AES-256. With 7z, also tick Encrypt file names.
- Send the archive one way (email, a download link) and the password another way (text message, phone call).
Can Windows 11 password protect a ZIP file without extra software?
No. Windows 11's built-in compression can't add a password, so you need a third-party tool (Windows Report). PowerShell's built-in ZIP commands can't create password-protected ZIPs either (Papermark).
What File Explorer can and can't do
In Windows 11 File Explorer you can right-click and choose Compress to to create ZIP, 7z and TAR archives (Pureinfotech). That's useful for bundling files, but the result isn't locked. Some guides describe a "File > Add a password" menu for compressed folders. We couldn't confirm that it exists in Windows 10 or 11, so don't count on it.
Why "Encrypt contents to secure data" (EFS) is not a ZIP password
Several popular guides, including NordPass, suggest the Encrypt contents to secure data checkbox in a file's Advanced properties. That checkbox is Windows' Encrypting File System (EFS). It doesn't put a password on the archive. If you want the person who opens the ZIP to be asked for a password, the archive itself has to be encrypted, and that's what the steps below do.
How to password protect a ZIP file with 7-Zip (Windows)
7-Zip is free on any computer, including at work. You don't need to register or pay (7-Zip FAQ). It runs on Windows 11 and 10 and on older versions back to XP, with downloads for x64, ARM64 and 32-bit x86.
Step by step: Add to archive, password, AES-256
- Download and install 7-Zip 26.06 from the official site. On Windows 11 you may need Show more options in the right-click menu to see the 7-Zip entry.
- Select the files or folder you want to protect, right-click and choose 7-Zip > Add to archive.
- Under Archive format, choose 7z or zip (see below).
- In the Encryption section, type your password and type it again to confirm.
- Check that Encryption method says AES-256. Don't assume the default is the one you want.
- If you chose 7z, tick Encrypt file names.
- Click OK. Test the archive by opening it and confirming that it asks for the password.
University IT guidance gives the same advice: choose AES-256 and tick Encrypt file names (UNOH Support).
7-Zip doesn't use your password as the key directly. It turns the password into an AES-256 key with a SHA-256-based function that runs many iterations, which makes each password guess slower for an attacker (7z format).
ZIP or 7z: which format to pick
7-Zip offers AES-256 in both formats. Its AES-256 for ZIP has been WinZip-compatible since version 4.43 in 2006 (changelog).
- Choose ZIP when the recipient expects a .zip file. The contents are encrypted, but the file names inside are not.
- Choose 7z when the file names reveal something, such as "Smith_divorce_settlement.pdf" or "2026_salaries.xlsx". Only 7z can hide them.
Either way, tell the recipient which tool you used so they can open it without guessing.
Hide the file names too ("Encrypt file names", 7z only)
The Encrypt file names option works in the 7z format. It hides the list of files until someone enters the password (Papermark). Without it, anyone can open the archive and read the names, sizes and folder structure. They just can't read the contents. Security writers also point out that file metadata stays exposed in encrypted ZIPs (Superhuman).
How to password protect a ZIP file on a Mac
Finder's Compress command has no password option at all (Rin Blog). You have two choices.
The built-in Terminal method (zip -e) and why it's weak
macOS includes a zip command that can add a password:
cd ~/Desktop
zip -e -r secret.zip MyFolderIt asks for the password twice. The -e option is the safer way to supply it, because the password stays out of your shell history and the process list. Avoid -P, which puts the password right on the command line.
The catch: whichever option you use, the macOS zip command only supports the old ZipCrypto (PKZip 2.0) encryption (Mattias Geniar). That keeps out a casual snoop, but it isn't suitable for anything sensitive.
Stronger option: an AES-256 tool such as Keka
For real protection, use Keka or another 7-Zip-compatible app that creates AES-256 encrypted archives (Peony). Look for the same choices as in 7-Zip: AES-256, a password, and the 7z format if you want the file names hidden. Then test the archive before you send it.
Linux: zip -e vs 7-Zip
Many Linux guides give the same zip -e command as the Mac method. It has the same problem: you get legacy ZipCrypto, not AES-256. If the contents matter, use a 7-Zip-compatible archiver that lets you choose AES-256. Pick the 7z format with file name encryption when the names themselves are sensitive.
ZipCrypto vs AES-256: why the encryption method matters
A "password-protected ZIP" can mean two very different things. ZipCrypto is the old ZIP 2.0 scheme. It's widely documented as weak and open to known-plaintext attacks (Peony). Because that weakness is in the method itself, a good password doesn't fully make up for it. AES-256 is the modern choice.
| Method | Strength | File names hidden? | Where you'll meet it |
|---|---|---|---|
| ZipCrypto (ZIP 2.0 / PKZip 2.0) | Weak, open to known-plaintext attacks | No | macOS zip -e and zip -P, zip -e in Linux guides |
| AES-256 in a .zip file | Strong with a good password | No | 7-Zip (WinZip-compatible), Keka and similar apps |
| AES-256 in a .7z file + Encrypt file names | Strong with a good password | Yes | 7-Zip and 7-Zip-compatible apps |
| Windows EFS checkbox | Not a password on the archive | Not applicable | Windows file properties |
How to choose a password that holds up
AES-256 is only as strong as the password behind it. 7-Zip's slow key derivation makes guessing expensive, but it can't save "summer2026".
- Use a long passphrase of several unrelated random words, or let a password manager generate one.
- Use a new password for each archive, never one you use for an account.
- Store it in your password manager. You'll need it if the recipient asks again.
How to send the password-protected file safely
Send the password by a different channel
Never put the password in the same email or message as the file or its link (Papermark). If that one inbox or chat is compromised, both halves leak together. Send the file by email or link, and the password by text message, a phone call or a messaging app.
Uploading the encrypted archive and sharing a link
Encrypted archives are often too big for email. Instead of attaching the file, you can upload it to InvisHosting and send the link. Here's how it works, limits included:
- Up to 300 MB per file, with no account needed.
- Anyone who has the link can download the file. Files are not end-to-end encrypted. That's exactly why you encrypt the archive first: whoever finds the link gets only the locked archive.
- You can set an expiry from 1 minute to 30 days, after which the file is deleted permanently. Without an expiry, files are kept until you delete them, until they break the Terms of Service, or until they get no downloads for 30 days.
- Without an account you get a one-time deletion token. With a free account you delete files from your dashboard.
For more ways to share files that disappear on their own, see our comparison of temporary file sharing services with expiring links.
Why some scanners can't check encrypted archives
Security software can't scan the contents of an encrypted archive (Superhuman). Attackers know this too, so a password-protected ZIP from a stranger, with the password in the same email, is a classic warning sign. If you receive one, extract it and scan the files before opening them. Our guide on how to check if a file is safe before you open it walks you through it.
Keep your archiver updated
Archivers handle files from strangers, so their bugs matter. 7-Zip fixed several vulnerabilities in 2026 (changelog):
- 26.02 (2026-06-25): fixed CVE-2026-14266, an XZ heap overflow.
- 26.03 (2026-09-03): fixed CVE-2026-58052, where 7-Zip failed to preserve the Mark-of-the-Web when extracting a crafted archive.
- 26.06 (2026-11-06): "Some bugs and vulnerabilities were fixed."
7-Zip doesn't update itself, so install 26.06 over your old copy. Other archivers have had similar problems; see the WinRAR CVE-2025-8088 update.
Frequently asked questions
Is a password-protected ZIP file secure?
It depends on the method. A ZIP encrypted with AES-256 and a strong password is solid protection for the contents. One made with ZipCrypto, which is what macOS zip -e produces, is weak. In both cases the file names inside a ZIP remain visible.
Can people see the file names inside a password-protected ZIP?
Yes, in a ZIP. To hide them, use the 7z format and tick Encrypt file names in 7-Zip.
Should I use ZIP or 7z for encryption?
Use 7z when the file names are sensitive or you control both ends. Use ZIP with AES-256 when the recipient specifically needs a .zip file.
What happens if I forget the ZIP password?
Treat the contents as lost. Strong encryption is built so that guessing passwords is slow, and that works against you as well. Keep the password in a password manager and keep an unencrypted original somewhere safe.
Is 7-Zip free and safe to use?
Yes. It's free with no registration or payment, including at work. Download it only from 7-zip.org and keep it on the latest version, currently 26.06.
Sources
- 7-Zip official home page
- 7z Format (official)
- 7-Zip FAQ (official)
- History of 7-Zip changes (official changelog)
- Create a password-protected ZIP file on Mac OSX (Mattias Geniar, updated June 2026)
- How to Password Protect ZIP Files That Stay Secure in 2026 (Peony)
- How to Password Protect Files on Mac (Peony)
- How to Create a Password-Protected ZIP File on macOS (Rin Blog)
- How to Password Protect ZIP Files in Windows 11 (Windows Report)
- How to create ZIP, TAR, and 7z archival format files on Windows 11 (Pureinfotech)
- How to password-protect a zip file on Windows & Mac (Superhuman)
- How to encrypt a ZIP file in 2026 (Papermark)
- Encrypting Folders with 7-Zip (UNOH Support)
- How to password protect a ZIP file (NordPass)
This article was written with AI assistance from the sources listed above and checked automatically against them.