How to password protect a zip file, what it hides, and what it does not
Several files have to go to somebody, and they should not be readable by whoever else handles the message. A zip with a password is the usual answer, it is a reasonable one, and there are three things about it that almost nobody is told.
Written · Updated
Drop the files into STRONGBOX, type a passphrase, and it writes a zip encrypted with AES-256 in the WinZip form that 7-Zip, WinZip, WinRAR, Keka and The Unarchiver all read. It also opens one, given the passphrase. Everything happens in the tab; the files are not uploaded and the page works with the network off. Three things to know before you rely on it: Windows and macOS cannot open an AES zip with the tools they ship with, the older kind of zip password is broken and should not be used, and a locked zip still tells anyone holding it what the files are called.
Zip has two kinds of password
STRONGBOX writes AES-256 only. It will open a ZipCrypto archive, because somebody will send you one, and it says which kind it found.
The part that catches people out
Windows Explorer cannot open an AES-encrypted zip. Neither can the Archive Utility that macOS uses when you double-click one. Both handle zip files perfectly well and both only understand the old ZipCrypto password. Double-clicking an AES zip on a stock Windows machine gives an unhelpful error, or an empty folder, or a prompt that rejects the correct password.
This is not a fault in the file. It is a gap in the built-in tools, and it has been there for twenty years. If you are sending a locked zip to somebody, tell them to open it with 7-Zip (free, Windows), Keka or The Unarchiver (free, macOS), or WinZip or WinRAR if they have them, or send them a link to STRONGBOX, which opens it in their browser with nothing to install.
If you are on the receiving end of this right now (Explorer calling the archive invalid, or refusing a password you know is correct), the failure on its own page goes through each of the errors Windows gives, how to tell which of the two schemes your archive uses, and the three ways to open it.
What a locked zip does not hide
Zip encrypts the contents of each file. It does not encrypt the list of files. Anybody holding the archive can read, without the password:
- Every file name and folder path.
Dismissal letter - Hannah Reid.docxtells the story before anyone types a password. - The size of each file, before and after compression, and how well each one compressed.
- The timestamps on each file.
- The number of files.
For most jobs this does not matter. For some (a leak, a grievance, a medical record) the names are the disclosure. The fix is to put the revealing zip inside a second, plain zip named something dull, or to use a container that encrypts its own index: CAPSULE makes a single encrypted file that opens in a browser and gives nothing away from the outside.
Choosing the passphrase
A zip passphrase is stretched with PBKDF2 at a thousand rounds, which was a reasonable number in 2003 and is a thin margin now: a modern graphics card tries a great many guesses a second. That makes the passphrase itself the whole of the protection. Four or five unrelated words beat any amount of punctuation stuffed into a short one; PHRASE generates them, and SHADOWKEY will tell you what a given one is actually worth.
And send it separately from the file. A password in the same email as the archive is a key taped to the envelope.
What gets compressed and what does not
STRONGBOX compresses what compresses and stores what does not. Text, spreadsheets, documents and logs shrink by a lot. Photographs, video, music and anything already zipped are already compressed, so they are stored as they are rather than churned through an algorithm that would add a fraction of a percent. The listing shows which happened to each file.
Opening one
Drop the archive in, type the passphrase, and the contents are listed: what is in it, how large each file is, and whether the encryption is AES or the old ZipCrypto. Save one file or save all of them. A wrong passphrase is caught immediately (the format carries a two-byte check for exactly that) and said in plain words rather than as a failure halfway through.
Zip against the alternatives
| If you want | Use | Why |
|---|---|---|
| Several files to one person who has 7-Zip or a Mac tool | A locked zip | Universal format, real encryption |
| One file to somebody with nothing installed | CAPSULE | Opens in any browser; the outside says nothing |
| A PDF only they should read | PADLOCK | Every PDF reader asks for the password |
| To send to the same person often | KEYRING | Encrypt to their key; no shared password to send |
| Just to make a zip, no password | PACK | Zip and unzip, nothing else |
The short version
| The job | Here | Notes |
|---|---|---|
| Make a zip nobody without the passphrase can read | Yes | AES-256, the WinZip form everything reads |
| Open a locked zip somebody sent | Yes | AES or the old ZipCrypto, named either way |
| Keep the files off somebody else's server | Yes | Written and read in the tab; works offline |
| Open it by double-clicking on Windows or a Mac | No | Neither built-in tool understands AES zips |
| Hide what the files are called | No | No zip does; the names are in the clear |
| Write the old ZipCrypto password | No | Deliberately: it has been broken since 1994 |
| Open a 7z, a rar or an encrypted 7z | No | Turned away with a sentence saying which it is |
Questions people ask about password protecting a zip
Why will Windows not open my password-protected zip?
Because Windows Explorer only understands the original ZipCrypto password, not the AES encryption that every serious tool now writes. The archive is fine. Open it with 7-Zip on Windows, Keka or The Unarchiver on a Mac, or in a browser with STRONGBOX. The same gap applies to the Archive Utility macOS uses when you double-click.
Is a password-protected zip actually secure?
With AES-256, the encryption is not the weak part; your passphrase is. Zip stretches it with PBKDF2 at only a thousand rounds, so a short or common passphrase can be guessed quickly. Four or five unrelated words are worth far more than a short one with symbols in it. With the old ZipCrypto, no: it has been breakable since 1994.
Can someone see what is in a locked zip without the password?
They can see every file name, every folder path, every file size and every timestamp. They cannot see the contents. If the names themselves give the game away, put that archive inside a plain one with a dull name, or use CAPSULE, which shows nothing from the outside.
What is the difference between ZipCrypto and AES in 7-Zip?
ZipCrypto is the 1990 scheme kept for compatibility with tools that understand nothing else; it falls to a known-plaintext attack. AES-256 is the modern one. If 7-Zip offers you the choice, choose AES-256, and expect the recipient to need 7-Zip or similar rather than double-clicking.
Is it safe to use an online zip password site?
Making a zip there means uploading the files you wanted protected, in the clear, before they are protected. Opening one there means uploading the archive and the passphrase together. A browser-only tool makes no copy: load the page, turn the network off, and it still works.
Can I open a zip whose password I have lost?
No, if it is AES. The files are encrypted and there is no way in but the passphrase. If it is ZipCrypto there are known attacks, but nothing here implements them.
Related tools
- STRONGBOXMake, or open, a password-protected zip on this device.
- CAPSULEAn encrypted file anyone can open in a browser.
- PACKZip and unzip files in the browser.
- PADLOCKPut a password on a PDF, or take one off.
- PHRASEPassphrases, passwords and recovery phrases.
- KEYRINGMake an age key pair and encrypt files to one.
- Password protect a PDF, and what protects nothingA PDF can carry two passwords and only one is security. What AES-256 does, why an owner password stops nobody, and what removing a password can and cannot mean.
- A password you can actually rememberPick the words at random from a published list instead of inventing a password yourself.
- Send a file without it sitting on a serverEncrypt it to the recipient's public key, or hand it over directly between two browsers.
- A password manager with no account and no cloudWhat a vault is underneath, what you get by having no account, and the four things you give up, starting with sync and ending with recovery.
- Sign a PDF, and which signature you needAn image, an electronic signature with an integrity record, and a certificate-based digital signature are three different things.
All 11 guides under “Locking it, signing it and handing it over”.
A letter, now and then
An occasional letter when there is something worth reading: the new guides and what changed in the tools. Never more than once a month and nothing else, and you can leave at any time on the unsubscribe page.