The simplest way: use a password-protected disk image
The fastest method is to create a disk image — a single file that acts like a locked container — and encrypt it with a password. This works on any Mac and requires no third-party software. The folder you want to protect goes inside the disk image, and anyone who wants to open it must enter your password first.
Disk images are built into macOS, so you are using tools already on your computer. When you lock a folder this way, the entire contents stay encrypted until someone mounts the image by typing the password. This is stronger than just locking a single folder, because the data itself is scrambled, not just hidden from view.
Key Takeaways
- A password-protected disk image is the standard Mac method and requires no extra software — you create it in Disk Utility, which comes with every Mac.
- You move your folder into the disk image, then delete the original folder, so the only copy is inside the locked container.
- Anyone who wants to open the folder must enter your password and wait a few seconds for the image to mount on the desktop.
- If you forget the password, the contents cannot be recovered, so write it down somewhere safe before you lock anything away.
- You can also password-protect a folder using FileVault, which encrypts your entire Mac, but disk images are faster if you only need one folder locked.
Creating a password-protected disk image in Disk Utility
Open Disk Utility by pressing Command-Space, typing "Disk Utility", and pressing Enter. Once it opens, click the menu bar at the top and select File, then New Image, then Blank Image. A dialog box will appear asking you to name the image and choose where to save it.
Name the image something you will recognize — for example, "Private Documents" — and choose your Desktop or Documents folder as the save location. In the dialog, you will see a dropdown menu that says Encryption. Click it and select 128-bit AES encryption (or 256-bit if you want stronger encryption, though 128-bit is sufficient for most people). Leave the format set to read/write so you can add files later.
Click Create. Disk Utility will ask you to enter a password twice. Type a password you will remember — this is the only way to open the image — and click Create again. The disk image file will appear on your Desktop or in the folder you chose. It looks like a small gray drive icon.
Moving your folder into the disk image
Double-click the disk image icon. It will mount on your Desktop, appearing as a new drive. Open it — it will be empty. Now drag your folder into this mounted image. You can also copy files one at a time if you prefer.
Once everything you want to protect is inside the image, go back to Finder and delete the original folder from your Mac. This is important: if you leave the original folder on your computer, you have two copies, and the unprotected one defeats the purpose. Empty the Trash to make sure the original is gone.
Now eject the disk image by right-clicking it in Finder and selecting Eject, or by dragging it to the Trash. The image will close, and your files will be locked inside. The only way to access them is to double-click the disk image icon and enter your password.
Opening and closing a password-protected disk image
Every time you want to use the files inside, double-click the disk image. macOS will ask for your password. Type it and click Unlock. The image will mount as a drive on your Desktop, and you can open, edit, or add files to it just like a normal folder.
When you are done, eject the image by right-clicking it and selecting Eject. The drive will disappear from your Desktop, and the files inside are locked again. You can leave the disk image file itself anywhere — on your Desktop, in Dropbox, on an external drive — and it will stay encrypted no matter where it is.
Using FileVault if you want automatic encryption
If you want your entire Mac encrypted so you do not have to manage individual disk images, use FileVault, which is built into macOS. Open System Settings, click Privacy & Security, and scroll down to FileVault. Click Turn On and follow the prompts. FileVault encrypts your whole hard drive, so every folder is protected automatically.
FileVault is stronger than a disk image because it protects everything, but it is slower to set up and you cannot turn it off quickly. Use FileVault if you want your entire Mac protected. Use a disk image if you only need one or two folders locked and want to set it up in five minutes.
What to do if you forget your password
If you forget the password to a disk image, the contents cannot be recovered. There is no "reset password" option and no way to unlock it without the correct password. Before you create the image, write your password down in a safe place — a password manager, a locked drawer, or somewhere you will not lose it.
If you are worried about forgetting it, test the password before you move your important files into the image. Create a practice disk image with a test password, close it, and try to open it again to make sure you remember the password correctly.
Frequently Asked Questions
Can I add files to a disk image after I create it?
Yes. Double-click the disk image to mount it, add or edit files inside, then eject it when you are done. The image expands automatically if you add more files, up to the size limit you set when you created it.
What is the difference between 128-bit and 256-bit encryption?
256-bit encryption is stronger and takes slightly longer to unlock, but both are find enough that no one will crack them by guessing. Use 128-bit unless you are protecting classified or extremely sensitive information.
Can someone access my files if they have the disk image but not the password?
No. The disk image is useless without the password. The files inside are scrambled, and there is no way to unscramble them without entering the correct password.
Can I share a password-protected disk image with someone else?
Yes. Send them the disk image file via email or file transfer. They can double-click it, enter the password you give them, and access the files inside. They cannot change the password unless you give them the original password first.
Does password-protecting a folder slow down my Mac?
No. Mounting a disk image takes a few seconds, but once it is open, files inside work at normal speed. Closing it takes one click and does not affect your Mac's performance.