How to Password Protect a ZIP File [Windows, Mac & Linux]
In this guide, I’ll show you how to password protect a ZIP file on Windows, macOS or Linux. Don’t get too carried away, the protection obtained by encrypting your zipped folders is nowhere near the levels of Fort Knox, but adding an extra layer of security to your data won’t hurt 🙂.
Table of Contents
How to Password Protect a Zipped Folder on Windows Using 7-Zip
7-Zip is a powerful, free tool that lets you password-protect your zip files with strong AES-256 encryption.
Steps to Create a Password-Protected Zip File Using 7-Zip:
- Download and install 7-Zip from here.
- Navigate to the folder containing the files you want to compress.
- Right-click the file or files you want to zip and choose 7-Zip > Add to archive.
- In the window that opens, select ZIP as the archive format.
- Under the Encryption section, set a password in both the Enter password and Reenter password fields.
- Select AES-256 as the Encryption Method.
- Click OK to create the zip file.
Your new zip file is now password-protected, ensuring that only those with the correct password can access the compressed files.
Using WinRAR to Password Protect a Zip File on Windows
WinRAR is another popular third-party software for file compression that allows you to add a password to your zip files.
Steps to Password Protect Files Using WinRAR:
- Download and install WinRAR from here.
- Select the files or folder you want to encrypt.
- Right-click and choose WinRAR > Add to archive….
- Choose ZIP as the archive format.
- Click on Set password… at the bottom right.
- Enter the password you want to use and click OK.
- Click OK again to create the zip file.
With WinRAR, your password-protected zip file will prevent unauthorized access, making it a good choice for protecting sensitive information.
(Bonus) How to Password-Protect a Zip File on Windows Using EFS
If you’re using Windows 7, 8, 10 or 11, the Encrypting File System (EFS) is a built-in option to encrypt your files. While EFS doesn’t allow you to put a password directly on a zip file, it does encrypt the files and folders before they are zipped, keeping them safe from unauthorized access.
Steps to Encrypt Files Using EFS:
- Navigate to the folder containing the file or files you want to encrypt.
- Right-click the folder you want to encrypt and select Properties.
- Under the General tab, click on Advanced.
- Check the box that says Encrypt contents to secure data.
- Click OK, then Apply.
After the files are encrypted, you can create a zip file using your preferred method. The encryption stays with the files, but remember that this encryption method is tied to your Windows user account.
How to Password Protect a Zip File on macOS
If you’re on a Mac, you can use the Terminal or a third-party application like Keka to password protect a zip file.
Steps to Create a Password-Protected Zip File on macOS Using Terminal:
- Open Terminal (found in the Applications folder under Utilities).
- Navigate to the folder containing the file or files you want to compress.
- Use the following command to create a password-protected zip:
zip -er newzip.zip file1 file2
. Replacenewzip.zip
with your desired zip file name andfile1 file2
with the files you want to compress. - Enter the password when prompted.
Your encrypted zip file is now ready, and only those with the password can access it.
How to Encrypt a Zip File on Linux
On Linux, you can also use the Terminal to create a password-protected zip file.
Steps to Password Protect a Zip File on Linux:
- Open the Terminal.
- Navigate to the folder containing the files you want to compress.
- Use the command:
zip -er newzip.zip file1 file2
. Replacenewzip.zip
with your desired zip file name andfile1 file2
with the files you want to compress. - Set the password when prompted.
This method is effective and works across all Linux distributions.
Great! So, now you know how to password protect a ZIP file. Wondering what happens if you forget the password?
Check out this guide on how to crack a ZIP file password. That’s right, password-protecting your ZIP files is not foolproof. With the right-tools and enough time, they can be cracked as well.