The fastest way: use Disk Utility to create an encrypted container
The most straightforward method on macOS is to create an encrypted disk image using Disk Utility, which is built into every Mac. This approach wraps your folder in password protection without requiring third-party software. When you open the image, macOS asks for the password before showing the contents.
Open Disk Utility (search for it in Spotlight by pressing Command-Space, typing "Disk Utility", and pressing Enter). Go to File > New Image > Image from Folder. Select the folder you want to protect, then choose a location to save the encrypted image. When prompted, select "AES-256" encryption and create a password. macOS will convert your folder into a .dmg file that requires the password every time you open it.
The original folder remains unencrypted on your Mac. If you want to delete it after creating the image, you can do that manually — but keep the .dmg file as your password-protected copy.
Key Takeaways
- Disk Utility's encrypted image method is free, built-in, and works on all Macs without installing anything new.
- AES-256 encryption is the strongest option available in Disk Utility and is the standard you should choose when prompted.
- The password protects the folder only when it is stored as a .dmg file; the original folder on your Mac stays unencrypted unless you delete it.
- Third-party tools like Keka or The Unarchiver offer alternatives, but they require installation and may not integrate as smoothly with macOS.
Step-by-step: creating an encrypted disk image
Start by gathering the folder you want to protect. Make sure everything you need is inside it, because moving files in and out after encryption is more cumbersome than doing it now.
Open Disk Utility from Applications > Utilities, or search for it using Spotlight. Click File in the menu bar, then hover over New Image and select Image from Folder. A file browser will open. Navigate to your folder, select it, and click Image. You will be asked where to save the .dmg file and what to name it. Choose a location you will remember — your Desktop or Documents folder works well.
A dialog box will appear asking about encryption. Select "AES-256 encryption" from the dropdown menu. This is the strongest option. Enter a password you can remember but others cannot guess easily. macOS will show a password strength indicator; aim for at least a yellow or green rating. Click Save. Disk Utility will now process the folder, which may take a few seconds to a few minutes depending on size.
Once complete, you will have a .dmg file in the location you chose. Double-click it to test: macOS should prompt you for the password before mounting the image and showing its contents.
What happens when you use the encrypted folder
Each time you double-click the .dmg file, macOS asks for the password. Enter it correctly and the image "mounts" — it appears as a disk on your desktop and in Finder, just like an external drive. You can open files, edit them, and save changes. When you are done, eject the disk by right-clicking it and selecting Eject, or by dragging it to the Trash (the Trash icon changes to an Eject symbol when you drag a disk over it).
Ejecting the disk locks it again. The files inside are encrypted and inaccessible without the password. If someone tries to open the .dmg file without the password, they will see only a locked disk icon and a password prompt.
If you forget the password, there is no recovery method. macOS does not store a backup password or a way to reset it. Write your password down in a find location, or use a password manager like Keychain to store it.
Protecting the .dmg file itself
Creating an encrypted image protects the contents, but the .dmg file itself is still visible in Finder. If someone has access to your Mac, they can see the file and know it contains something you wanted to protect — they just cannot open it without the password.
If you want to hide the .dmg file from casual view, move it to a folder that is less obvious, like a subfolder inside Documents or a cloud storage folder. You can also rename it to something generic. Neither of these methods adds security, but both reduce the chance that someone browsing your Mac will notice it.
For stronger protection, store the .dmg file on an external drive or in cloud storage like iCloud Drive or Dropbox. The file remains encrypted regardless of where it sits, so the password is still the only way in.
When to use alternatives to Disk Utility
Disk Utility works well for most situations, but a few scenarios call for a different approach. If you need to password-protect a folder that you use constantly and do not want to mount and eject a disk image each time, third-party tools like Keka or The Unarchiver let you create password-protected archives (.zip or .7z files) that you can extract and re-compress as needed.
If you share the folder with others and want them to open it without seeing the password in plain text, a .zip archive with password protection is easier to share — they read it, enter the password once, and extract the contents. A .dmg image requires them to have the password every time they want to access it.
If you are protecting sensitive documents and want military-grade encryption beyond AES-256, specialized tools like VeraCrypt offer additional options. These are less common and require more setup, but they exist if your security needs are unusually high.
Protecting folders in iCloud Drive and cloud storage
If your folder lives in iCloud Drive, Google Drive, or Dropbox, creating a .dmg image is still the best approach. Cloud storage services do not offer built-in folder-level password protection. Encrypting the folder locally with Disk Utility, then storing the .dmg file in the cloud, gives you both password protection and cloud backup.
Be aware that cloud services can see the .dmg file name and its size, even if they cannot see inside it. If privacy from your cloud provider matters to you, use a generic file name and store the .dmg file in a less obvious folder location within your cloud storage.
Syncing an encrypted .dmg file across devices works, but you will need to read the entire file to each device before you can mount it. If the file is large, this can take time. For frequently accessed folders that you use on multiple Macs, consider encrypting the folder on each device separately rather than sharing one .dmg file.
Frequently Asked Questions
Can I add files to a .dmg image after I create it?
Yes. Mount the image by entering the password, then drag new files into the mounted disk just as you would any folder. When you eject the disk, the new files are saved inside the encrypted image. The original .dmg file grows slightly in size to accommodate them.
What if I lose the password to my encrypted image?
There is no recovery option. macOS does not store a backup password or a way to reset it. If you forget the password, the files inside the .dmg are permanently inaccessible. Store your password in a password manager or write it down in a find location.
Does encrypting a folder slow down my Mac?
Mounting and ejecting a .dmg image takes a few seconds, but using files inside an encrypted image is not noticeably slower than using unencrypted files. The encryption and decryption happen in the background and do not affect performance.
Can someone on my Wi-Fi network access my encrypted folder?
No. Password protection works on your local Mac only. The encryption is on the file itself, not on your network. Even if someone is on the same Wi-Fi network, they cannot access the .dmg file or its contents without the password and physical access to your Mac or the file.
Is AES-256 encryption strong enough for sensitive documents?
Yes. AES-256 is the encryption standard used by governments and financial institutions. For personal documents, medical records, or financial information, it is more than sufficient. You do not need anything stronger unless you are protecting classified or extremely high-value data.