Skip to content
All Online Tools

How to password protect a ZIP file on Windows, Mac or online

, 5 min read

Neither Windows File Explorer nor the Mac's built-in Compress option can put a password on a ZIP file. The fastest way without installing anything is Password-Protected ZIP: add your files, type a password, and download a ZIP encrypted with AES-256. The files are packed on your own device and never uploaded. If you would rather use desktop software, 7-Zip on Windows and the Terminal on a Mac both work, with a catch on the Mac that is covered below.

Online, in any browser

  1. Open Password-Protected ZIP and add up to 50 files.
  2. Give the ZIP a name and enter a password of at least 4 characters. Longer is much better; see the tips at the end.
  3. Leave Encryption on AES-256 unless the person receiving it can't install anything (see the next section).
  4. Click Create encrypted ZIP and download it.

To open it, the recipient needs the password and a program that supports AES ZIPs. Unzip Files on this site opens them in a browser too.

On Windows with 7-Zip

  1. Install 7-Zip, which is free, from its official site, 7-zip.org.
  2. Select your files or folder, right-click and choose 7-Zip > Add to archive. On Windows 11, click Show more options first.
  3. Set Archive format to zip.
  4. Under Encryption, type the password twice and pick AES-256 as the method.
  5. Click OK.

If you choose the 7z format instead of zip, 7-Zip can also encrypt file names, which a ZIP can't do. The recipient will then need 7-Zip or a similar program.

On a Mac with Terminal

Open Terminal, type cd followed by a space, drag the folder that contains your files into the window, and press Return. Then run:

zip -er secure.zip "Folder Name"

You'll be asked for the password twice. The ZIP opens with a double-click on any Mac or Windows PC, but it uses the old ZipCrypto method, which is weak. For anything sensitive, use AES with one of the other methods, or a Mac app such as Keka.

AES-256 or ZipCrypto?

ZipCrypto is the original ZIP encryption from the 1990s. Its advantage is that almost everything can open it, including the built-in tools in Windows and macOS. Its weakness is serious: freely available tools can often break it in minutes, especially when the attacker has an unencrypted copy of any one file in the archive. Treat it as a lock that keeps honest people out.

AES-256 is the same standard banks and governments use. With a good password it is not realistically breakable. The trade-off is compatibility: the built-in ZIP tools in Windows and macOS have historically not opened AES ZIPs, so the recipient may need 7-Zip, WinRAR, Keka, The Unarchiver or a browser tool. Tell them that when you send it.

Choose AES-256 by default. Choose ZipCrypto only for low-stakes files going to someone who can't install anything.

What a ZIP password does not protect

  • File names are visible. Anyone can list what's inside an encrypted ZIP, including names, sizes and dates, without the password. If "2026-tax-return-SSN.pdf" is itself sensitive, rename files before zipping, or use Encrypt File, which turns everything into one locked .enc file that reveals nothing.
  • Email filters may block it. Some email systems quarantine encrypted attachments because they can't scan them for viruses. If yours does, share the file through a cloud link instead.
  • The password travels separately. Sending the password in the same email as the ZIP defeats the purpose. Text it, say it on a call, or use a different app.

Picking a password

Length matters more than symbols. Four or five random words, like maple-orbit-canvas-tuesday, are much harder to guess than P@ssw0rd! and easier to read out over the phone. A forgotten password can't be recovered by anyone, us included, so keep it in a password manager.

Not sure whether ZIP is the right container at all? Our comparison of ZIP, RAR, 7Z and TAR explains when each one makes sense. And if you only need to lock a single document, password protecting a PDF may be simpler for the person receiving it.