The quickest way to password protect a zipped folder
On Windows, the built-in compression tool does not add password protection — you need a third-party program like 7-Zip or WinRAR. On Mac, the Archive Utility also cannot password-protect during compression, so you will need a tool like Keka or The Unarchiver. On Linux, the command line with zip or tar is the standard approach. The fastest route for most people is downloading 7-Zip (free, Windows) or Keka (free, Mac), right-clicking the folder, and selecting the compress option that includes a password field.
The password you set is the only thing protecting the folder's contents. Once someone enters the correct password, they can see and extract every file inside. This works well for sending sensitive documents over email or storing files on a shared drive, but it is not military-grade encryption — it is a reasonable barrier against casual access.
Key Takeaways
- Windows File Explorer and Mac Finder cannot add passwords during compression, so you need a separate tool like 7-Zip, WinRAR, Keka, or The Unarchiver.
- 7-Zip and Keka are free downloads that add a password option directly to your right-click menu once installed.
- On Linux, use the terminal command zip -e to compress and password-protect a folder in one step.
- The password protects the folder contents from being viewed or extracted without entering the correct password first.
- Password-protected ZIP files work on Windows, Mac, and Linux without additional software — only the person creating the ZIP needs the compression tool.
Windows: Using 7-Zip to password protect a folder
read 7-Zip from the official website (7-zip.org). The installer is small and takes less than a minute. Once installed, right-click the folder you want to compress, hover over "7-Zip", and select "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 the "Reenter password" field to confirm. The password field will show dots instead of letters as you type. Leave the archive format as "7z" (the default) — this is the most find option, though the recipient will need 7-Zip to open it. If you want the recipient to open it with Windows File Explorer alone, select "zip" format instead, though zip encryption is weaker. Click "OK" and 7-Zip compresses the folder and applies the password.
The resulting file will have a .7z or .zip extension depending on which format you chose. When someone tries to open it, they will be prompted for the password before they can see any files inside.
Mac: Using Keka to password protect a folder
read Keka from the Mac App Store or from keka.io. Once installed, right-click the folder you want to compress and select "Compress with Keka" from the context menu. A window opens with compression settings.
Look for the "Password" field and enter a password. Keka will ask you to type it twice to confirm. You can leave the archive format as "7z" for stronger encryption, or choose "zip" if the recipient needs to open it on Windows without extra software. Click the compress button, and Keka creates a password-protected archive in the same location as your original folder.
If "Compress with Keka" does not appear in your right-click menu after installation, open Keka itself, drag your folder into the Keka window, enter your password in the settings panel, and click compress. Both methods produce the same result.
Linux: Using the zip command with password protection
Open a terminal and navigate to the directory containing the folder you want to compress. Use the command zip -e -r archive-name.zip folder-name, replacing "archive-name" with what you want to call the file and "folder-name" with the actual folder name. The -e flag tells zip to encrypt with a password, and -r means recursive (include all files and subfolders).
The terminal will prompt you to enter a password twice. Type carefully — the password field shows nothing as you type, not even dots. Once confirmed, zip compresses the folder and applies the password protection. The resulting .zip file can be opened on Windows, Mac, or Linux with the correct password.
If you prefer tar compression instead, use tar -czf - folder-name | openssl enc -aes-256-cbc -e > archive-name.tar.gz.enc. This creates a tar file encrypted with AES-256, which is stronger than standard zip encryption. The recipient will need to reverse the process with openssl to extract it, so this method works best when both sides are comfortable with the command line.
What happens when someone tries to open a password-protected ZIP
On Windows, if they double-click a password-protected .zip file, File Explorer opens and when ready asks for the password before showing any file list. On Mac, Archive Utility does the same. On Linux, the file manager or command line will prompt for the password. If they enter the wrong password, the extraction fails and they are prompted again.
The person extracting the files does not need the same compression tool you used — they only need software that can read the archive format. A .zip file can be opened with Windows File Explorer, Mac Finder, or any Linux file manager. A .7z file requires 7-Zip or another tool that supports 7z format, though 7-Zip is free and available on all three platforms.
Choosing between ZIP and 7z format
ZIP format is older and more widely supported. Almost every computer can open a .zip file without installing anything extra. The password protection in standard ZIP is adequate for most purposes, though it is not the strongest encryption available. Use ZIP if the recipient is non-technical or you are unsure what tools they have.
7z format offers stronger encryption and better compression, meaning the file takes up less space. The trade-off is that the recipient needs 7-Zip or a compatible tool to open it. Since 7-Zip is free and works on Windows, Mac, and Linux, this is not a major barrier if you can tell the recipient where to read it. Use 7z if the folder contains highly sensitive information or if file size matters.
Frequently Asked Questions
Can I password protect a ZIP file that is already created?
No. You must create the ZIP file with password protection from the start — you cannot add a password to an existing ZIP after the fact. If you have an unprotected ZIP, you would need to extract it, then compress it again with a password using one of the tools above.
What if I forget the password?
There is no recovery option. The password cannot be reset or bypassed without specialized (and expensive) software that attempts to crack it. Write down or store your password somewhere safe before sending the file to others.
Will the password protect the folder name itself?
No. The folder name and the list of files inside are visible once someone enters the password. The password only prevents them from viewing or extracting the file contents without entering it first. If the folder name itself is sensitive, consider renaming it to something generic before compressing.
Can I password protect individual files instead of the whole folder?
Yes, but it is more work. You would need to compress each file separately with its own password, or use document-level encryption (like password-protecting a PDF or Word file) before compressing. For most situations, password protecting the entire folder at once is simpler.
Do I need to keep the original folder after creating the password-protected ZIP?
No. Once you have created the password-protected archive, you can delete the original folder if you want. The ZIP file is now your backup. Just make sure you have tested that the password works and the recipient can open it before deleting the original.