How to password-protect a ZIP or 7Z on a Mac

A password is the simplest protection before sending contracts, reports or ID scans. The Compress item in the macOS context menu can't set one, so you need another route.

zip -e in Terminal

Run zip -e -r output.zip folder, enter the password twice, and you get an encrypted ZIP. It uses legacy ZIP encryption (ZipCrypto), which almost every archiver can open but which is weak and not suitable for genuinely sensitive files.

How the encryption options differ

Creating an encrypted archive with Zip7zX

Right-click files or a folder in Finder, choose Encrypt & Compress…, pick ZIP or 7Z, enter a password and choose the encryption; with 7Z you can also encrypt file names. AES-256 creation in Zip7zX is part of Pro and fully available during the 14-day trial.

Keeping the password safe

Strong encryption has no back door, so a forgotten password means a locked archive. When sharing, send the archive and the password through different channels, such as email for the file and a message for the password. Zip7zX Pro's password vault keeps frequently used passwords in your Mac's keychain, readable only on that Mac, tries them automatically and never uploads them.

Receiving an encrypted archive

Extracting password-protected ZIP, 7Z and RAR archives is free in Zip7zX. Enter the password when you extract.

FAQ

Can I open an archive if I forget the password?

No. AES-256 has no back door, so keep the password somewhere safe.

Will Windows users be able to open an encrypted ZIP?

A ZipCrypto ZIP opens almost anywhere. AES-256 ZIP or 7Z needs an archiver with AES support, such as 7-Zip; the archive support built into an operating system may not handle it.

Does encryption slow compression down much?

No. AES itself costs very little; the time depends mostly on the compression level and file size.

Zip7zX · Archive utility for macOS
Single-volume RAR extraction free forever · Pro $3.99/yr or $8.99 lifetime · macOS 14+

Related guides