Password protection for zip files works differently depending on your operating system and which tool you use
Windows and Mac both have built-in zip tools, but neither encrypts by default — they just compress. To add a password, you need either a third-party program like 7-Zip or WinRAR on Windows, or the Archive Utility settings on Mac. Online tools like 7-Zip Online or Encrypto offer password protection without installing software, though you're uploading your files to someone else's server. The method you choose depends on whether you want to stay offline, how often you compress files, and whether you're working on a shared computer.
Once a zip is password-protected, anyone who extracts it must enter the password — the protection stays with the file even after you send it. The password does not expire and cannot be changed without recreating the zip from scratch.
Key Takeaways
- Windows built-in zip does not encrypt; you need 7-Zip, WinRAR, or another third-party tool to add a password during compression.
- Mac's Archive Utility also does not password-protect by default, but you can use the command line or download a tool like Keka or BetterZip.
- Online tools like 7-Zip Online let you password-protect without installing anything, but your files travel across the internet to their servers.
- Standard zip encryption is weaker than AES-256; use 7-Zip with AES-256 for sensitive files, though recipients will need 7-Zip to open the resulting .7z file.
Password protecting on Windows with 7-Zip
7-Zip is free, open-source, and widely used. Download it from the official 7-zip.org website, install it, then right-click the file or folder you want to compress. Select "7-Zip" from the context menu, then "Add to archive." A dialog box opens with compression options.
In the dialog, look for the "Encryption" section near the bottom. Enter your password in the "Enter password" field, then type it again in "Reenter password." You can also choose the encryption method — AES-256 is the strongest option and is selected by default. Click "OK" and 7-Zip creates a password-protected .7z file (not a .zip file, though 7-Zip can also create encrypted .zip files if you change the archive format in the dialog). The file is now encrypted and cannot be opened without the password.
Password protecting on Windows with WinRAR
WinRAR is commercial software with a 40-day trial. Download it from rarlab.com, install it, then right-click your file or folder and select "Add to archive." The WinRAR dialog opens.
Click the "Advanced" tab, then look for "Set password." Enter your password twice and click "OK." WinRAR creates a .rar file by default, but you can change the archive format to .zip in the main dialog if you need a standard zip file instead. Note that WinRAR's zip encryption is less secure than its native .rar format, so if security matters, stick with .rar or use 7-Zip instead.
Password protecting on Mac using the command line
Mac's Archive Utility does not have a built-in password option in the graphical interface, but you can use the Terminal to create an encrypted zip. Open Terminal (find it in Applications > Utilities), then type this command:
zip -e -r filename.zip /path/to/folder
Replace "filename.zip" with what you want to call the archive and "/path/to/folder" with the path to your file or folder. Press Enter. Terminal prompts you to enter a password twice. The encrypted zip file appears in your current directory. This method uses standard zip encryption and works on any Mac without additional software.
Password protecting on Mac with third-party tools
If you prefer not to use Terminal, download Keka (free) or BetterZip (paid). Keka is simpler: drag your file into Keka, select "Zip" as the format, check the "Encrypt" box, set your password, and click "Create Archive." BetterZip offers more control over compression settings and encryption options but costs money.
Both tools create standard password-protected zip files that work on Windows and other systems. Choose Keka if you want free and straightforward; choose BetterZip if you compress files often and want a full-featured tool.
Using online tools to password-protect without installing software
Sites like 7-Zip Online, Encrypto, or ezyZip let you upload a file, set a password, and download the encrypted zip without installing anything. Go to the site, click "Choose File" or drag your file into the upload area, enter a password, and click "Encrypt" or "Create Archive." The site generates a password-protected zip that you download to your computer.
The trade-off is that your file travels to their server, sits there briefly while they encrypt it, and then you download it. If the file contains sensitive information, this method is riskier than encrypting on your own computer. Use online tools for non-sensitive files or when you're on a shared computer where you can't install software. Always check the site's privacy policy to see how long they keep uploaded files.
What happens when someone opens a password-protected zip
When another person receives your password-protected zip, they double-click it (or right-click and select "Extract"). Their computer's default zip tool prompts them for a password before extracting. They type the password you gave them, and the files decompress. If they enter the wrong password, extraction fails and they see an error message.
The password stays with the zip file — it does not expire and does not change. If you send the same zip to multiple people, they all use the same password. If you need to revoke access, you cannot; you would have to create a new zip with a different password and send that instead.
Frequently Asked Questions
Can I password-protect a zip file that's already been created?
No. You must create the zip with password protection from the start. If you already have an unencrypted zip, you need to extract it, then re-compress it with a password using 7-Zip, WinRAR, or another tool. There is no way to add a password to an existing zip without recreating it.
What password should I use?
Use a password that is at least 12 characters long and mixes uppercase, lowercase, numbers, and symbols. Avoid dictionary words, names, or dates. A strong password makes the encrypted zip much harder to crack. Write it down somewhere safe if you might forget it — there is no "forgot password" option for zip files.
Will the password work on both Windows and Mac?
Yes, as long as you create a standard .zip file (not .7z or .rar). Both Windows and Mac can open password-protected zip files. The person receiving the file just needs their operating system's built-in zip tool or a third-party tool that supports encrypted zip.
Is zip encryption secure enough for sensitive files?
Standard zip encryption (ZipCrypto) is weak by modern standards. If you are protecting highly sensitive files, use 7-Zip with AES-256 encryption instead, which creates a .7z file. The recipient will need 7-Zip or a compatible tool to open it, but the encryption is much stronger.
Can I password-protect just one file inside a zip, or does the whole archive need a password?
The entire zip file is password-protected as a unit. You cannot password-protect individual files within it. If you need different people to access different files, you must create separate password-protected zips for each person or group.