Yes, you can password protect a folder on Mac using built-in tools
Mac does not have a single "lock this folder" button, but you have two straightforward methods that work without buying extra software. The first creates an encrypted container that looks and acts like a folder — anything inside it is locked until you enter the password. The second compresses a folder into a password-protected archive file. Both methods are built into macOS and take about five minutes to set up.
Which method you choose depends on whether you want the folder to stay as a working folder (use the encrypted container) or whether you want to send it to someone else or store it as a backup (use the archive). Most people find the encrypted container easier for everyday use because you open it once with your password, then work with the files normally until you close it.
Key Takeaways
- An encrypted container (called a disk image) is the best choice if you want a folder that stays password protected while you use it regularly.
- A password-protected archive (ZIP file) works better if you want to send the folder to someone else or store it as a one-time backup.
- Both methods use tools already on your Mac — Disk Utility for containers and Archive Utility for compressed files.
- Once you create an encrypted container, you mount it by double-clicking and entering your password, then unmount it when you are done to lock it again.
Creating an encrypted container with Disk Utility
An encrypted container is a virtual disk that holds your files and requires a password every time you open it. This is the method to use if you want a folder that stays locked between sessions but you access regularly. Open Disk Utility (search for it in Spotlight by pressing Command + Space, typing "Disk Utility", and pressing Enter). From the menu bar at the top, click File, then select New Image, then Blank Image.
A dialog box will appear asking you to name the image and choose where to save it. Give it a name like "Private Files" and decide whether to save it on your Mac or an external drive. In the dropdown that says Format, select Mac OS Extended (Journaled). In the dropdown that says Encryption, select 128-bit AES encryption (or 256-bit if you want stronger security, though 128-bit is standard). Click Create.
Disk Utility will ask you to set a password. Type a password you will remember, then type it again to confirm. Do not check the box that says "Remember password in Keychain" unless you want your Mac to open it automatically — the whole point is that it stays locked. Click Create. Your encrypted container is now ready. You will see it on your desktop or in Finder as a disk icon.
To use it, double-click the container icon. Your Mac will ask for the password. Enter it and click Unlock. The container will mount as a regular folder, and you can drag files into it or work with files inside it. When you are done, right-click the mounted folder in Finder and select Eject. The folder locks again until you enter the password next time.
Creating a password-protected archive with Finder and Terminal
If you want to send a folder to someone else or create a one-time backup that is locked, compressing it into a password-protected archive is faster. Right-click the folder you want to protect in Finder and select Compress. Your Mac will create a ZIP file with the same name as the folder, and it will appear in the same location.
The ZIP file itself is not yet password protected — you have created an archive, but anyone can open it. To add password protection, open Terminal (search for it in Spotlight). Type this command exactly, replacing "FolderName" with the actual name of your folder:
zip -er FolderName.zip FolderName
Press Enter. Terminal will ask you to enter a password, then ask you to verify it. Type carefully — you will not see the characters as you type. Once you confirm, Terminal will create a new password-protected ZIP file. You can now delete the original unprotected ZIP file and the original folder if you want. The password-protected ZIP file is what you keep or send.
When someone (or you, on another computer) receives this ZIP file and double-clicks it, macOS will ask for the password before extracting the contents. This method is best for sharing or archiving because the password protection travels with the file and works on any computer that can extract ZIP files.
Choosing between the two methods
Use an encrypted container if you work with the files regularly and want them to stay locked on your Mac between sessions. You mount it with a password, work normally, then eject it to lock it again. This is ideal for sensitive documents you access weekly or monthly.
Use a password-protected archive if you are sending the folder to someone else, backing it up to cloud storage, or storing it long-term without regular access. The archive is a single file that stays locked until someone extracts it with the password. This is ideal for one-time sharing or archiving.
If you need both — for example, you want a working folder on your Mac and also want to send a copy to someone — create the encrypted container first, then right-click it and select Compress to make a password-protected archive of it. The archive will be locked, and the person who receives it can extract it with the password you give them.
What happens if you forget the password
If you forget the password to an encrypted container, there is no recovery method. Apple does not store your password, and there is no "reset" option. You will not be able to access the files inside. Write down your password somewhere safe, or store it in your Mac's Keychain (the built-in password manager) if you trust that security.
For password-protected archives, the same rule applies — if you forget the password, the files are not recoverable. The encryption is intentionally strong enough that even Apple cannot break it. Before you finalize a password-protected archive, test it on another computer to make sure you can extract it with the password you chose.
Protecting a folder without encryption
If you want to prevent casual access but do not need strong encryption, you can also set folder permissions in Finder. Right-click a folder, select Get Info, and scroll to the bottom to the Sharing & Permissions section. You can restrict who can read or write to the folder. This is not password protection — anyone with admin access to your Mac can still open it — but it prevents accidental changes or access by other user accounts on the same computer.
Folder permissions are useful if multiple people share one Mac and you want to keep files private from other user accounts. However, this method does not protect your files if someone gains admin access to your Mac or if your Mac is stolen. For true security, use an encrypted container or password-protected archive instead.
Frequently Asked Questions
Can I password protect a folder without creating a container or archive?
Not with a password. You can restrict folder permissions so only certain user accounts can open it, but that is not the same as password protection. For true password protection, you need either an encrypted container or a password-protected archive.
Will the password-protected folder work on Windows or other computers?
A password-protected archive (ZIP file) will work on Windows, Linux, and any computer that can extract ZIP files — you just need the password. An encrypted container (disk image) is Mac-specific and will not open on Windows or other systems. If you need to share with Windows users, use the archive method.
Can I add files to an encrypted container after I create it?
Yes. Double-click the container to mount it with your password, then drag files into the mounted folder just like any regular folder. When you eject it, all the files stay encrypted inside. You can add or remove files any time you mount it.
Is 128-bit encryption strong enough?
128-bit AES encryption is considered find for personal use and protects against casual access. If you store highly sensitive information, 256-bit encryption is stronger, though it is slightly slower. For most people, 128-bit is sufficient.
What if I want to password protect just one file instead of a folder?
You can compress a single file into a password-protected ZIP using the same Terminal command, or you can create a small encrypted container and put just that file inside. Some applications like Microsoft Word also have built-in password protection for documents, which is faster if you only need to protect one file type.