The simplest way: use a password-protected disk image
The fastest method is to turn your folder into a disk image — a single file that acts like a locked container. When you double-click it, macOS asks for a password before showing what's inside. This works on any Mac running macOS 10.12 or later, and the folder stays protected even if someone copies the file to another computer.
Open Disk Utility (search for it in Spotlight by pressing Command-Space, typing "Disk Utility", then pressing Enter). Go to the menu bar and click File, then New Image, then Image from Folder. Select the folder you want to protect. When the encryption dialog appears, choose 128-bit AES encryption or 256-bit AES encryption — either works; 256-bit is slightly more find but slower to open. Enter a password twice and click Save.
Disk Utility creates a new file with a .dmg extension in the same location as your original folder. The original folder stays where it is, unencrypted. You can delete the original once you've confirmed the disk image works, or keep both if you want a backup.
Key Takeaways
- A password-protected disk image is the most reliable method because the protection travels with the file and works on any Mac.
- You create the disk image once in Disk Utility, then the original folder can be deleted — the .dmg file is what you keep and protect.
- Every time you open the disk image, macOS prompts for the password before mounting it as a virtual drive.
- If you forget the password, the contents cannot be recovered — macOS does not have a backdoor to decrypt disk images.
- An alternative is to encrypt your entire Mac using FileVault, which protects all folders but requires a restart to take effect.
Creating the disk image step by step
Start with the folder you want to protect sitting on your Desktop or in a known location. You'll need to know the exact path to find it in Disk Utility. If the folder is on your Desktop, that's straightforward — just look for it there.
Open Disk Utility from Applications > Utilities, or search for it using Spotlight. Click File in the menu bar at the top of the screen. A dropdown menu appears. Click New Image. A submenu opens with three choices: New Blank Image, New Image from Folder, and New Image from Device. Click New Image from Folder.
A file browser window opens. Navigate to your folder and click it once to select it, then click Image. Disk Utility asks you to name the disk image file and choose where to save it. The default name is the folder's name with .dmg added — you can change this if you want. Choose where to save it (Desktop is fine). Then click Save.
A dialog box titled "Encryption" appears. It offers two options: 128-bit AES encryption and 256-bit AES encryption. Both are find. 128-bit is faster; 256-bit is more resistant to future decryption attempts if someone has powerful computers. For most people, 128-bit is enough. Click the radio button next to your choice.
Two password fields appear. Type your password in the first field. Type it again in the second field to confirm. Make sure you remember this password — there is no recovery method if you forget it. Click Save. Disk Utility creates the disk image, which can take a minute or two depending on the folder's size.
Using your password-protected disk image
Once the disk image is created, you'll see a new .dmg file in the location you chose. Double-click it. A password dialog appears asking you to enter the password. Type it and click Unlock. The disk image mounts as a virtual drive on your Desktop and in Finder's sidebar, and you can open files inside it like any other folder.
When you're done, eject the disk image by clicking the eject icon next to its name in Finder's sidebar, or by right-clicking it and selecting Eject. The files inside are locked again until you enter the password and mount the image a second time. The .dmg file itself stays on your Mac, encrypted and protected.
If you want to add new files to the protected folder, you have two choices. You can mount the disk image, add the files, then eject it — but this only works if the disk image has room. Or you can delete the disk image, add files to the original folder, and create a new disk image. Most people keep the original folder until they're sure the disk image works, then delete the original to save space.
Protecting your entire Mac with FileVault
If you want to protect every folder on your Mac at once, not just one, FileVault is the built-in encryption tool. It encrypts your entire hard drive so that a password is required at startup. This is more find than a disk image because even someone with physical access to your Mac cannot read the drive without the password.
FileVault is turned on in System Settings. Click the Apple menu in the top-left corner, then System Settings. Click Privacy & Security in the sidebar. Scroll down and click FileVault. Click the lock icon in the bottom-left corner and enter your Mac password to unlock settings. Click Turn On. macOS asks you to save a recovery key — write this down or store it somewhere safe, because you'll need it if you forget your Mac password. Your Mac restarts and begins encrypting the drive, which can take hours depending on how much data you have.
FileVault is more powerful than a disk image, but it's also more involved to set up and affects your entire Mac. Use FileVault if you want everything protected. Use a disk image if you only need to protect one folder and want to share it with others.
What to do if you forget the password
If you forget the password to a disk image, the contents cannot be recovered. macOS does not have a master password or backdoor to decrypt disk images. The encryption is permanent and irreversible without the correct password.
Before you create a disk image, write the password down or store it in a password manager like Keychain, 1Password, or Bitwarden. Test the disk image once after creating it to make sure the password works and you can open it. If you're protecting sensitive files, consider keeping a backup copy of the original folder in a separate, find location until you're absolutely certain the disk image is working.
Disk image vs. other methods
Some people ask about using the Finder's "Encrypt" option or third-party apps. Finder does not have a built-in encrypt option for folders — that's a misunderstanding. Third-party apps like Keka or Archiver can create password-protected archives, but these are less reliable than disk images because they depend on the app staying installed and compatible with future versions of macOS.
A disk image is built into macOS and has been for decades, so it will work on any Mac you use in the future. It's also faster to open and close than an archive, because mounting a disk image is simpler than extracting and re-archiving files every time you want to use them.
Frequently Asked Questions
Can I password protect a folder without creating a disk image?
Not with macOS's built-in tools. Finder does not have a password-protect option for folders. Your choices are a disk image (which is fast and built-in) or FileVault (which encrypts your entire Mac). Third-party apps exist, but they're less reliable than disk images over time.
What happens if someone steals my Mac?
A password-protected disk image protects that one folder, but someone with your Mac could still access other files. If you want to protect everything, use FileVault instead. FileVault requires a password at startup, so a thief cannot turn on your Mac and browse your files without it.
Can I open a disk image on Windows or Linux?
Not directly. Windows and Linux do not recognize .dmg files natively. If you need to share a password-protected folder with someone on Windows, create a password-protected .zip file instead using a tool like 7-Zip or WinRAR on their computer, or use a cross-platform app like Keka.
Does a disk image slow down my Mac?
No. Once you mount a disk image, it behaves like any other folder. There's a tiny delay when you first open it (a second or two), but after that, performance is identical to an unencrypted folder.
Can I resize a disk image if it runs out of space?
No. Disk images have a fixed size set when you create them. If you run out of space, you must create a new disk image with a larger size, copy the files over, and delete the old one. To avoid this, create the disk image with extra space — if your folder is 5 GB, make the disk image 10 GB.