The simplest way to password-protect a folder on Mac
macOS does not have a built-in feature to password-protect individual folders the way Windows does. Instead, you create an encrypted disk image — a virtual container that holds your folder and requires a password to open. This takes about three minutes and works reliably across all Mac models.
The tool you use is Disk Utility, which comes with every Mac. You tell it to create a new image, point it at your folder, set a password, and from then on your folder only opens when you enter that password. The folder itself stays in place; the encrypted image is a separate file you can move, back up, or delete.
Key Takeaways
- macOS uses encrypted disk images instead of folder-level passwords — you create a virtual container that holds your folder and requires a password to open.
- Disk Utility, the built-in Mac tool, creates the encrypted image in about three minutes with no additional software needed.
- Once created, the encrypted image appears on your desktop or in Finder like a regular external drive, and you mount it by entering your password.
- If you forget the password, the data inside becomes inaccessible — macOS has no recovery method, so write the password down or store it in a password manager.
- For folders you access constantly, keeping the image mounted all day is normal; for occasional access, you can unmount it to lock the folder again.
Creating an encrypted disk image with Disk Utility
Open Disk Utility by pressing Command+Space, typing "Disk Utility", and pressing Enter. In the menu bar at the top, click File, then select "New Image" and choose "Image from Folder". A dialog box opens asking you to select the folder you want to encrypt.
Navigate to the folder, click it once to select it, then click Image. Disk Utility asks where you want to save the encrypted image file and what to name it. Choose a location you will remember — your Desktop or Documents folder works well. The filename can be anything; "Encrypted Folder" or the original folder name both work.
A dropdown menu labeled "Encryption" appears near the bottom of the dialog. Click it and select "128-bit AES encryption" or "256-bit AES encryption". 256-bit is stronger and still fast enough for everyday use; choose that unless you have a very old Mac. Then enter a password twice to confirm it, and click Save.
Disk Utility creates the encrypted image, which may take a few seconds to a few minutes depending on the folder size. When it finishes, you have a new file with a .dmg extension — that is your encrypted container. The original folder remains unencrypted on your Mac; if you want it gone, you delete it yourself after confirming the image works.
Opening and closing your encrypted folder
Double-click the .dmg file. macOS asks for your password. Enter it and click Unlock. The encrypted folder appears on your desktop or in Finder as a mounted volume — it looks and acts like an external hard drive. You can open it, add files, edit documents inside it, and move things in and out just like a normal folder.
When you are done working, right-click the mounted volume in Finder and select Eject, or drag it to the Trash. The folder locks immediately. The .dmg file stays on your Mac, and the next time you need the folder, you double-click it again and enter the password.
If you work with the folder every day, you can leave it mounted all day without re-entering the password. Mounting it once in the morning and ejecting it at night is a common routine. There is no performance penalty to leaving it mounted — it uses the same amount of storage whether locked or unlocked.
What happens if you forget the password
macOS has no password recovery for encrypted disk images. If you forget the password, the data inside becomes inaccessible permanently. There is no "reset password" option, no recovery email, and no way to contact Apple to unlock it.
Write your password down in a physical notebook, store it in a password manager like 1Password or Bitwarden, or save it in the Notes app on your Mac — whichever method you will actually use and remember. The inconvenience of writing it down is much smaller than the cost of losing access to the folder.
Moving or backing up your encrypted folder
The .dmg file is portable. You can move it to an external drive, email it, or upload it to cloud storage like iCloud Drive or Google Drive. The encryption stays with it — anyone who receives the file needs your password to open it, and the password does not travel with the file.
If you back up your Mac with Time Machine, the .dmg file gets backed up automatically. If your Mac fails and you restore from backup, your encrypted folder comes back with it, still locked and still requiring the password.
If you want to move the folder to a different Mac, copy the .dmg file to that Mac, double-click it, enter the password, and it opens the same way. The encryption works on any Mac running any recent version of macOS.
Alternatives if you need something different
If you want to password-protect files inside a folder but leave the folder itself open, you can encrypt individual documents instead. Most applications — Word, Google Docs, Apple Pages — have built-in password protection for documents. You set a password when you save, and the file requires that password to open.
If you need to share an encrypted folder with other people and want them to be able to change the password themselves, encrypted disk images do not support that. You would need third-party software like Keka or BetterZip, which cost money but offer more sharing options.
If you want the folder to lock automatically after a certain amount of time, you can set that up by creating a simple automation in the Shortcuts app, but this requires some technical setup. For most people, manually ejecting the image when done is simpler and more reliable.
Frequently Asked Questions
Can I add files to the encrypted folder after I create the image?
Yes. Mount the image by entering your password, then drag files into the mounted folder just like any other folder. When you eject the image, the new files stay encrypted inside it. You can add and remove files as many times as you want.
What is the difference between 128-bit and 256-bit encryption?
256-bit encryption is mathematically stronger and takes longer to crack, but both are secure enough that brute-force guessing is not practical. For personal folders, either works. 256-bit is the better choice if you have the option, and it is still fast on modern Macs.
Can someone else open my encrypted folder if they have my Mac password?
No. Your Mac password and your image password are separate. Someone with your Mac password can see the .dmg file, but they cannot open it without the image password. The encryption is independent of your Mac login.
Does the encrypted folder slow down my Mac?
No. When the image is mounted, it performs like a normal folder. When it is ejected, it takes up only the storage space of the .dmg file itself, the same as any other file on your Mac.
What if I lose the .dmg file?
If you delete the .dmg file by accident, the encrypted folder is gone. Keep a backup of the .dmg file on an external drive or in cloud storage, the same way you would back up any important file. Time Machine backs it up automatically if you use it.