Lock ZIP Files on Mac with Password Protection
A practical guide to password-protected ZIP files on macOS. Learn the native Terminal command, understand its encryption limitation, and use an Apple encrypted disk image when stronger Mac-only protection is a better fit.
To create a password-protected ZIP without downloading software, use Terminal: type zip -er archive_name.zip file_or_folder, press Return, and enter the password twice. Finder's Compress command does not offer a password option. The built-in zip command uses legacy ZIP encryption, so use an encrypted disk image in Disk Utility for stronger Mac-only storage.
Table of Contents
- Why the Mac Archive Utility Isn't Enough
- approach 1: Zip Password Mac Terminal (Free, native)
- approach 2: external Archivers (Keka, Archiver)
- Recommended Built-In Alternative: Encrypted Disk Image
- Tutorial: Securing Files Without Terminal
- Free vs Full Version Comparison
- Troubleshooting & Password Recovery
- Frequently Asked Questions

What are you trying to do?
Just encrypt one file quickly
Use the native Terminal. It's free and already installed on your Mac, though it requires typing commands.
Jump to Terminal Steps →Protect whole folders securely
Use Disk Utility to create an encrypted disk image when the files will remain in a Mac workflow and stronger encryption matters more than ZIP compatibility.
See secure software →Securely sync to Google Drive
Cloud lockers can encrypt your files locally on your Mac *before* they are uploaded to your cloud-based storage.
Read about cloud lockers →Recover a forgotten password
Locked yourself out? We cover what to do if you've lost the password to your encrypted Mac file.
Go to troubleshooting →How macOS Handles ZIP Files
If you're wondering how to lock a ZIP file on Mac, you've likely already discovered a frustrating truth: Apple makes it incredibly straightforward to compress files, but surprisingly unintuitive to lock them.
When you right-click a file on macOS (Ventura, Sonoma, or Sequoia) and select "Compress", the system uses the native Archive Utility. This utility creates a standard ZIP file instantly. That said, it offers no menu choice to add a password.

To create a password-secured ZIP on Mac, you have three primary paths:
- The Terminal: Using command-line instructions (Free, but intimidating for beginners).
- Third-party archivers: Using an app that explicitly supports creating encrypted ZIP archives.
- Encrypted disk images: Using Apple's Disk Utility to create a password-protected image for stronger Mac-focused storage.
Mac Terminal ZIP Password Command
If you want to password protect zip mac free without installing any extra software, the Terminal is your only native choice. Here is the exact process.
Step-by-Step Terminal Instructions
Follow these steps carefully to lock a zip file with password mac:
- Open the Terminal app (press
Cmd + Space, type "Terminal", and hit Enter). - Type
cdfollowed by a space, then drag the folder that contains the file you want to compress into the Terminal window. Press Return. (This changes the directory to where your file lives). - Now, enter the encryption command. Copy the code below:
zip -er ProtectedArchive.zip "Name Of Your Folder or File"

Breaking down the command:
zipcalls the archiving tool.-etells the tool to encrypt (lock) the archive.-rstands for "recursive" (essential if you are zipping a folder, so it includes all files inside).ProtectedArchive.zipis what the new file will be named.
- Press Return. The Terminal will prompt you to
Enter password:. - Type your desired password. Note: The cursor will not move, and no characters (not even stars) will appear. This is a normal security function on Mac. Just type carefully and hit Return.
- You will be asked to
Verify password:. Type it again and hit Return.
Your password-secured ZIP file is now created in the same location as the original file.
Password Protect ZIP on Mac Without Terminal

If typing commands into Terminal is uncomfortable, use a reputable archiving app that explicitly supports creating encrypted ZIP archives. Check the selected encryption format before creating the archive; a graphical interface does not automatically mean stronger encryption.
Legacy ZipCrypto offers broad compatibility but weak protection against password guessing. AES-encrypted ZIP variants can be stronger, but recipients may need a compatible archive application. Test the exact archive on the recipient's platform before deleting the originals.
Best Mac ZIP Tools with Password Protection: Comparison
| approach | Difficulty | Encryption Strength | Cost | Best For |
|---|---|---|---|---|
| Mac Terminal | High (Command Line) | Standard ZIP (ZipCrypto) | Free | Tech-savvy users zipping a single file. |
| Third-party archiver | Medium | Varies; verify the selected format | Free / Paid choices | Users who need a visual interface for ZIPs. |
| macOS FileVault | Low (Set once) | XTS-AES-128 | Free | Full disk encryption; does not protect individual sent files. |
| Disk Utility image | Medium | Encryption option selected during creation | Included with macOS | Strong Mac-focused protection for files and folders. |

Use an Encrypted Disk Image for Mac-Only Storage
Open Disk Utility, choose File > New Image > Image from Folder, select the folder, and choose an encryption option. Record the password safely: Apple warns that a forgotten password prevents access. Eject the image when finished so its contents are no longer mounted in Finder.
Disk images are best for Mac workflows; use an interoperable encrypted archive when recipients use other platforms.

Encrypted Disk Image vs. Standard Mac ZIP
The right format depends on whether you prioritize compatibility, strength, or convenient editing.

Editable Storage
A read/write disk image mounts as a volume in Finder, allowing you to add, remove, and edit files. Eject it when finished so another user must enter the password to mount it again.
No Extracted Residue
Opening a ZIP normally creates extracted copies. Those copies remain ordinary files unless you remove them safely. A mounted disk image also exposes its contents to the signed-in session, so eject it promptly after use.
Cloud Storage Considerations
You may store an encrypted image in a sync folder, but wait for syncing to finish before opening it elsewhere and avoid simultaneous edits on two Macs. Keep an independent backup in case the container is damaged or a sync conflict occurs.
Sharing and Compatibility
Before sharing, confirm that the recipient can open the chosen format. Send the password through a different communication channel and never include it in the same email as the encrypted file.

Create an Encrypted Disk Image with Disk Utility
This Apple-supported workflow protects a folder without Terminal. Work on a copy first and keep an independent backup until you have tested opening the image.

Open Disk Utility
Open Disk Utility from Applications > Utilities, then choose File > New Image > Image from Folder.
Select the Folder
Choose the folder you want to protect, click Open, and select where the disk-image file should be saved.
Choose Encryption and Format
Choose an encryption option and enter a long, unique password. Select a read/write image if you need to change its contents later, or a read-only format for a fixed archive.
Save, Test, and Eject
Save the image, open it with the password, verify the files, and eject the mounted image when finished. Apple warns that a forgotten password cannot be used to reopen the image.

Choose the Right Protection Format
ZIP archives and encrypted disk images solve different problems. Choose based on who must open the files and how often the contents will change.
| Question | Password-protected ZIP | Encrypted disk image |
|---|---|---|
| Best use | Sending a compatible archive | Protecting files in a Mac workflow |
| Built-in creation | Terminal only for password protection | Disk Utility graphical workflow |
| Compatibility | Broad, but encryption support varies | Primarily Mac |
| Editing contents | Usually extract, edit, and recreate | Read/write images can be mounted and edited |
| Recovery | No reset for a forgotten archive password | No access if the image password is forgotten |

Keep an unencrypted original only until you have verified the protected copy and its backup. Store the password separately from the protected file.
Problem Solving & Password Recovery
We receive thousands of queries regarding locked files, such as "how to unlock a password-secured ZIP file on Mac" or "forgot zip password mac terminal". Here are the owner-safe recovery notes.
"I forgot the password to a ZIP file I created on Mac. How do I fix it?"
If you used Terminal to encrypt a ZIP file and lost the password, there is no built-in password reset. Use only legitimate recovery sources:
- Check the password manager or records where you intentionally saved the archive password.
- Restore an unencrypted original from a trusted backup, or ask the sender to recreate the archive.
"Terminal says 'zip warning: name not matched'"
This usually means you typed the filename wrong or didn't include the exact path.
Fix: Use the drag-and-drop approach. Type zip -er NewName.zip (leave a space after zip) and physically drag the file from Finder into the Terminal window. The Mac will auto-fill the correct, exact path.
Forgot an encrypted disk-image password?
Apple warns that you cannot open the disk image without its password. Check an authorized password manager or backup; do not rely on a recovery path that you have not tested.
Common Questions and Answers
We've compiled answers to the most frequent questions regarding Mac file locks and data privacy.

Q1. How to create a password protected ZIP on Mac without Terminal?
Finder's Compress command does not add passwords. Use an archiving app that explicitly creates encrypted ZIPs, or use Disk Utility to create an encrypted disk image when the recipient uses a Mac.
Q2. What encryption does macOS use for password-protected ZIPs?
When using the zip -e command in Terminal, macOS typically defaults to the older ZipCrypto standard. This is generally considered weak by modern cybersecurity standards. It will stop a casual snooper but won't stop a dedicated hacker. For AES-256, you need software.
Q3. Can I preview an encrypted archive in a cloud browser?
Usually not. Cloud previews generally cannot display the contents of a client-encrypted archive or disk image. Download or sync the file, open it with a compatible local application, and enter the password on your device.
Q4. How should I share the password?
Confirm the recipient can open the chosen archive format, then send the password through a different communication channel. Do not place the password in the same email or message as the encrypted file.
Q5. How to open a password-protected ZIP received from a Windows user?
Try opening a copy with Archive Utility. If it reports an error or does not support the archive's encryption method, use a reputable archiver that supports the exact ZIP format. Confirm the password with the sender rather than uploading a confidential archive to an unknown online service.
More on Digital Security & Privacy
How Data Brokers Collect and Monetize Personal Data
Archive encryption protects the contents of a file at rest or in transit, but it does not protect information you publish or grant to apps and services. Review sharing permissions, app access, and public profiles separately.

GDPR and CCPA Rights Explained Simply
If you live in the EU (GDPR) or California (CCPA), you have the legal right to demand companies delete your data. This is known as the "Right to be Forgotten." You can submit data deletion requests to platforms, ensuring that even if your Mac is secure, your cloud footprint is minimized.
Our Verdict
Use Terminal ZIP encryption only when its broad compatibility and simple workflow meet the risk. For sensitive files kept in a Mac workflow, prefer an encrypted disk image and retain a tested backup. For cross-platform sharing, choose an AES-capable archive application and test the archive with the recipient.

Test recovery before relying on any encrypted container and store its password separately.