Skip to content
EasyToPaste

Can I Password-Protect a ZIP Folder? Yes — Just Not With Windows' Own Tool

You can password protect a zip folder, but Windows' built-in Compress to ZIP has no password option. How to do it with 7-Zip or on a Mac, and what it still leaks.

EasyToPaste Team Published 6 min read
  • zip files
  • encryption
  • how-to

קרא בעברית

Short answer: yes, a ZIP folder can be password-protected — but not by the tool most people reach for first. Windows File Explorer will compress a folder to a ZIP and offers no password box anywhere in that flow. You need a separate archiver. On a Mac, the Finder is the same story and the Terminal can do it in one command, though the command picks the weaker of the two ciphers.

So the real question is not can I, it is which of the two encryptions am I getting, because ZIP has a strong one and a broken one and the filename is identical either way. The detail is in is a password-protected ZIP file encrypted? and the comparison is in AES-256 ZIP vs a one-time link.

If what you actually want is for one person to receive one file once, an archive is a lot of ceremony for it: send a one-time encrypted link instead — encrypted in your browser, with the key never sent to the server. The record is deleted when the secret is read, and the uploaded file’s encrypted object is cleared by a storage lifecycle rule about 38 days after it was created, unreadable throughout because the key was never ours. See How It Works.

Related: are password-protected ZIP files secure? · how to send a ZIP file securely · the password is in the same email as the ZIP.

Windows: the built-in tool cannot do it

Right-click a folder in Windows, pick Compress to ZIP file — or Send to → Compressed (zipped) folder on older versions — and you get an archive with no password and no prompt offering one. There is no hidden setting. The compressed folders feature in Windows XP did have an Add a password command, which is why people remember it existing, and it has not been there for a long time.

Two consequences worth knowing:

  • A ZIP you made this way is readable by anyone who gets it. Compression is not encryption, and a ZIP with no password is a transparent container.
  • Encrypted ZIPs you receive may not open in Explorer either. Built-in extractors handle AES-encrypted archives inconsistently, so if you send one, confirm the recipient has an archiver that can read it before the deadline rather than after.

Windows with 7-Zip, step by step

7-Zip is free, open source and the usual answer.

  1. Install 7-Zip, then right-click the folder you want to protect. On Windows 11 the 7-Zip entry sits under Show more options in the context menu.
  2. Choose 7-Zip → Add to archive…
  3. Set Archive format to zip. Leave it on 7z only if you are sure the recipient has 7-Zip too — see below.
  4. Type the password into Enter password and Reenter password.
  5. Set Encryption method to AES-256. This is the step that matters. The ZipCrypto default is the legacy scheme with a published attack against it.
  6. Click OK. The result is an ordinary .zip that other archivers can open with the password.

If the filenames themselves are sensitive, change Archive format to 7z and tick Encrypt file names. That hides the file list as well as the contents, which ZIP cannot do — but the recipient now needs a tool that reads 7z, which is not a safe assumption on a locked-down work machine.

macOS: the Terminal can, and it picks the weak cipher

The Finder’s Compress command has no password option. The Terminal does:

cd ~/Documents
zip -er archive.zip MyFolder

-e encrypts, -r walks the folder, and you are prompted for the password twice. The file it produces opens anywhere.

The caveat is the one that matters: the zip command bundled with macOS uses the legacy ZipCrypto scheme, not AES. It is better than nothing against a casual reader and it is not what you want for an ID scan or a contract. For those, use a graphical archiver that offers AES-256, or skip the archive entirely.

What the password still does not hide

Even with AES-256 and a good passphrase, an encrypted ZIP leaves these behind, and they are the reason the archive route keeps disappointing people:

  • The filenames, in a standard ZIP. The contents are encrypted; the index normally is not.
  • The copies. The archive sits in your sent folder, the recipient’s inbox, both download folders and the backups of all four, for as long as those accounts exist.
  • The password’s journey. Most people type it into the next line of the same email, which cancels the whole exercise — and is the standard shape of a malicious attachment besides. That is its own article: the ZIP password is in the same email.
  • Offline guessing. Whoever holds the archive can try passwords on their own hardware with no rate limit and no alert, so a memorable password is a short delay rather than a lock.
  • Any trace of who opened it. An attachment cannot be withdrawn and reports nothing. A one-time link can at least be revoked by a signed-in sender, which an archive cannot — but it reports nothing either: we keep no read receipt, because a one-time read deletes the record outright instead of marking it.

When to skip the archive

Password-protecting a ZIP is a reasonable answer when the recipient needs a set of files, can open AES archives, and you have a separate channel for the passphrase. The full checklist is in how to send a ZIP file securely.

It is the wrong answer when the thing you are sending is a credential, when it is one file going to one person once, or when you would rather it did not sit in a mailbox afterwards. For those, a one-time link gives you properties the archive cannot: the file is encrypted in the browser with AES-256-GCM before it is uploaded, the key travels in the fragment after the # so the server never receives it, the record is deleted when the secret is read or when it expires, and the encrypted object is cleared by a storage lifecycle rule about 38 days after it was created. Details on Security and the caps on pricing.

The short version

  • Yes, a ZIP folder can carry a password — Windows’ own compressor just cannot add one.
  • On Windows use 7-Zip, format zip, and change the encryption method to AES-256 rather than accepting ZipCrypto.
  • On macOS zip -er works but uses the legacy cipher; reach for an AES-capable archiver for anything sensitive.
  • The password never hides the filenames, never shortens how long copies live, and must travel by a different route than the file.
  • For a single hand-off, a one-time encrypted link is less work and leaves less behind.

Try it with a test file and open the link in another browser window to see exactly what your recipient gets.

Common questions

Can I password-protect a ZIP folder?
Yes, the ZIP format supports encryption, but the tool matters. Windows File Explorer can create a ZIP and cannot put a password on one, so the password has to come from a separate archiver such as 7-Zip. On a Mac the Terminal can do it in one command. In both cases you then have a second decision to make, because ZIP supports two encryption schemes and only one of them is worth using.
Can a ZIP file be password protected on Windows 11?
Not with the built-in Compress to ZIP file command, which offers no password option at all and has not since the Windows XP era. Install an archiver such as 7-Zip, right-click the folder, choose Add to archive, set the archive format to zip, type a password and set the encryption method to AES-256 rather than the ZipCrypto default. The resulting file is a normal .zip that other archivers can open.
How do I password-protect a zipped folder on a Mac?
The Finder command Compress has no password option, but the Terminal does: zip -er archive.zip foldername prompts for a password and encrypts the contents. The important caveat is the cipher. The zip command that ships with macOS uses the legacy ZipCrypto scheme, not AES, so for anything sensitive use an archiver that offers AES-256 instead of relying on the built-in command.
Is a Windows encrypted ZIP file secure?
It depends entirely on which scheme made it and how good the password is. ZipCrypto, the legacy default in several tools, has had a published known-plaintext attack against it since the 1990s. AES-256 ZIP encryption is strong. Because the file extension is the same either way, a recipient cannot tell them apart by looking, so the honest answer is that password-protected tells you nothing on its own.
Does a ZIP password hide the names of the files inside?
No, not in a standard ZIP. The contents of each file are encrypted and the list of filenames normally is not, so anyone holding the archive can read that it contains Passport_scan.pdf or Salary_2026.xlsx without knowing the password. If the names themselves are sensitive, the 7z format can encrypt the file list as well, at the cost of the recipient needing a tool that reads it.

All articles