Let's be clear: your Mac doesn't have a built-in, straightforward way to set a password for the ZIP archive. You'll either have to fiddle with Terminal (which is free) or use a third-party app (which is fast but can cost some money). So, let's look at the best tools and learn how to password-protect a ZIP file.
How to create a ZIP file on a Mac
Let's start with the basics. Your Mac can create and extract ZIP archives by default. Here's how to zip files.
- For a single file or folder. Right-click the file you want to zip and choose Compress from the drop-down menu. Instead of right-clicking, you can press the Control key and click to open the drop-down menu.
- For multiple files or folders. Select the necessary files with the mouse or click them one by one while holding down the Command key. Then right-click to open the drop-down menu and select Compress. All selected files will be compressed into a single archive.
And there you have it!
3 ways to password-protect ZIP on Mac
Let's move on to a more difficult task and learn how to password-protect ZIP files.
How to password-protect a ZIP file with Terminal
The only native way to password-protect an archive on a Mac is through the Terminal.
- Open Terminal on your Mac.
- Type in cd and the location of the file or folder you want to compress and protect. In our case, it's the Desktop, but your file could be anywhere else: Downloads, Applications, etc.
- Type this command into Terminal: zip -e -r YourZipFileName.zip TheFileOrFolderYouWantToZip
- YourZipFileName.zip is the name of the file you want to receive. In our case, it is Setapp_protected.zip.
- TheFileOrFolderYouWantToZip is the name of the ZIP file you want to password-protect.
- Type the password for your archive, confirm it, and press Enter. When you type the password, no characters are displayed – this is normal.
- Wait for the process to finish. You'll find the new ZIP in the same folder as the original file.
You're done! Remember your password because there's no "forgot password" option here. This method has the right to live if you need to encrypt one or two archives. But if you have a lot of files and protecting them is your routine, there are better ways to go than the Terminal.
Create encrypted archives on a Mac in seconds
When it comes to third-party archive protection tools, Archiver is probably the fastest and the easiest.
Here's how to password-protect a ZIP file on a Mac using Archiver:
- Download and open Archiver.
- Drag the folder or file you want to zip into the app window.
- Click Archive.
- Select the compression format and compression level.
- Check the Encrypt box and create and confirm a password.
- Click Archive again.
Be sure to memorize your password or store it in a safe place. You'll have to type it each time you open the archive, even if you work on the same computer you used for encryption.
The easiest way to protect ZIP files on your Mac with BetterZip
If you need a more advanced tool for frequent work with archives, then BetterZip is the best choice. First, it's easy: drag and drop, and the file is archived and password-protected. Second, it is secure. It automatically protects your files and folders with AES-256 encryption (also called "military-grade protection") and has a password generator for creating and managing strong passwords for files or folders.
You'll need to configure a few settings first, but after that, zipping, encrypting, and opening archives will always be a breeze.
Step 1. After downloading and opening BetterZip, click BetterZip > Settings > Passwords in the top menu. Set up the Master Password in the lower left corner. This will allow you to customize your passwords further.
Step 2. Set the password for future archives.
- In the Settings, go to the Presets section.
- Switch to the Save tab and select Clean and Zip.
- Select the encryption Method. We recommend that you choose Strong (AES-256).
- Click the Set button next to the Password line and set a password. You can enter it manually or generate it by clicking the key icon. Remember the password. BetterZip will apply it to all subsequent ZIP files you create until you set a new one.
- Close the Settings.
Now, the app is ready to use. To password-protect ZIP on Mac, drag the file or folder into the BetterZip window and click Save. The new protected archive will appear next to the original file or folder.
Both you and the person you share the archive with must enter a password to open it. But what if you don't want to type passwords every time, but you also don't want to unprotect your ZIP file? There is a solution.
Return to Settings > Passwords and check the box "Add all entered passwords to this list." From the drop-down menu, choose what the password manager should do. We recommend selecting the Automatically try passwords except for RAR archives option.
Now, you don't need to type anything. BetterZip will automatically choose the password from the saved ones when you open the archive. However, unauthorized people will still need to type in the password.
How to open a password-protected file on a Mac
The easiest way to open an encrypted ZIP is to double-click it and enter the password. Archive Utility (a native Mac tool) will open and unpack your file.
The other way is to use the Terminal.
- Open Terminal on your Mac
- Use the cd command to change directories to where your ZIP file is located. For example, if it's on your Desktop, you would use cd desktop.
- Type the following command, replacing YourZipFileName.zip with the name of your ZIP file: unzip YourZipFileName.zip
- Type in the password for the ZIP file and press Enter. Note that any characters won't show on the screen; this is normal for password prompts in Terminal.
- Wait for the process to finish. Your files will be extracted to the current directory.
The disadvantage of the Mac's native tools is that opening them equals unpacking them. Once you open the archive, a folder containing the unzipped files is created on your Mac. You won't be able to preview or edit the files inside the ZIP.
If you want to manage the files inside the archive, extract individual files without unzipping them, etc., you'll need third-party apps. We recommend BetterZip to open encrypted ZIPs. Here's how it works:
- Open BetterZip on your Mac.
- Drag and drop the zipped file you want to view or edit (or find it in the left menu in BetterZip).
- If you're viewing files, double-click the file in the compressed folder to view
- If you are making edits, like changing the filename, make any edits you like.
- If edits were made, select "Save" at the top left of the BetterZip window to re-save the compressed file or folder.
As long as you use BetterZip, you can perform many functions without disturbing the compression.
Open any ZIP with a password on Mac in a breeze
Unfortunately, the Mac's built-in tools don't provide an easy way to set and remove a password from the ZIP archive. You can use the Terminal to encrypt and decrypt the archive. But the process is tedious, so it's unsuitable for regular tasks. Archive Utility (the native Mac app) only allows you to remove passwords, not set them.
If you work with password-protected archives regularly, use the third-party apps BetterZip and Archiver. They protect files securely and allow you to edit them inside the archive, retrieve individual files without unzipping the entire archive, and so on.
Both BetterZip and Archiver are free during a seven-day trial of Setapp, a prolific suite of productivity apps for the Mac. In addition to these two great tools, you'll gain unlimited access to the entire Setapp catalog of nearly 200 amazing Mac apps.
How do I password-protect a ZIP folder?
Use the Terminal to password-protect the archive on a Mac. Open Terminal, navigate to your folder's location with cd, then run zip -er YourZipName.zip FolderName. Enter and verify your password when prompted.
Why won't my protected ZIP file open?
If your password-protected ZIP file won't open, it might be due to an incorrect password, unsupported encryption by the Archive Utility on Mac, a corrupted ZIP file, outdated or incompatible unzipping software, or insufficient file permissions. Try using a different app like BetterZip or Archiver, check for software updates, or ensure you have the correct file permissions.