Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

How to Encrypt a Folder in macOS (And Why You Should)

· 6 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Encrypting a folder on macOS creates a password-protected disk image that scrambles its contents, so anyone without the password sees only gibberish. The built-in Disk Utility app does this for free, with no extra software. You should encrypt any folder containing personal documents, financial records, or work files—if your Mac is lost or stolen, encryption is the only thing standing between your data and a stranger. This guide walks you through creating an encrypted folder image and covers common pitfalls.

What You'll Need

  • A Mac running macOS (any recent version; steps are nearly identical across versions).
  • The folder you want to encrypt, stored locally on your Mac (not on an external drive, for simplicity).
  • Enough free disk space to hold a copy of the folder—the encrypted image temporarily needs space for the original data.
  • Strong password you can remember—there is no recovery if you forget it.

Step-by-Step

  1. Open Disk Utility. Press Cmd + Space, type “Disk Utility,” and hit Return. It’s in Applications > Utilities.
  2. Create a new blank image. In Disk Utility’s menu bar, click File > New Image > Blank Image… (or press Cmd + N). A dialog appears.
  3. Configure the image. Give it a name (e.g., “PrivateFiles”), choose a save location (like your Desktop), and set the size to something larger than your folder’s total size. For example, if your folder is 500 MB, set the size to 600 MB—you can always make it bigger later, but not smaller without recreating it.
  4. Choose encryption. In the “Encryption” dropdown, select 128-bit AES encryption (256-bit is stronger but slower; 128-bit is plenty for most users). You’ll be prompted to enter and verify a password. Do not use your login password—use a unique one. Uncheck “Remember password in my keychain” unless you’re okay with anyone logged into your Mac accessing the folder without a prompt.
  5. Set the format. For the “Format” dropdown, choose Read/Write so you can add files later. Leave “Partitions” as Single partition and “Image Format” as sparse disk image—this lets the image grow as you add files, rather than taking up the full size immediately.
  6. Click Save. Disk Utility creates the image and mounts it—you’ll see a new volume appear on your Desktop and in Finder’s sidebar.
  7. Copy your folder into the encrypted image. Drag your original folder into the mounted volume (the one with the name you chose). Wait for the copy to finish—check the progress window or the Finder status bar.
  8. Verify the copy. Open the copied folder inside the volume and spot-check a few files to make sure they open correctly.
  9. Eject the image. Right-click the mounted volume and select Eject, or drag it to the Trash (which turns into an eject icon). The image file (with a .dmg extension) remains on your disk, now encrypted.
  10. Delete the original folder. After confirming the copy is intact, move the original folder to the Trash, then empty the Trash. If you keep the original, encryption is pointless—the unencrypted data is still sitting on your drive.

To open the encrypted folder later, double-click the .dmg file, enter the password, and it mounts. To add more files, just drag them in. To remove files, drag them out, then eject.

Common Mistakes

  • Forgetting the password. There is no “forgot password” option for a Disk Utility encrypted image. If you lose it, the data is gone forever.
  • Choosing a size too small. If your folder is 2 GB and you set the image to 1 GB, the copy will fail. Always check the folder size first (right-click > Get Info).
  • Keeping the original folder. Many people encrypt a copy but leave the original unencrypted on the same drive—defeating the purpose.
  • Using the same password as your login. If someone guesses your login password, they can unlock the folder. Use a distinct, strong password.
  • Not ejecting before deleting the original. If you delete the original while the image is still mounted, you might accidentally delete files from the mounted volume instead of the original—be careful which window you’re in.

Tips

  • Use a password manager to store the encryption password—it’s the only way to avoid losing it.
  • If you need to share the encrypted folder with someone, you can send the .dmg file and give them the password separately (e.g., over a different channel).
  • For extra security, store the .dmg file in a cloud service (like iCloud Drive) after encrypting—the contents are unreadable without the password.
  • If you have a lot of files, consider encrypting a whole external drive instead of individual folders—Disk Utility can do that too, but it’s a different process.
  • To change the password later, open the .dmg (it must be mounted), then in Disk Utility select the mounted volume and choose File > Change Password.

Troubleshooting

“The operation couldn’t be completed” error when copying. This usually means the image is too small. Check the folder size, then recreate the image with a larger size. You can also try deleting the image and starting over.

I forgot the password. There is no way to recover it. If you have a Time Machine backup of the original folder, you can restore from that—but the backup itself is not encrypted, so it’s not a secure fallback.

The .dmg file won’t open. Make sure you’re double-clicking the .dmg, not the mounted volume. If you get a “damaged” error, try downloading the file again if it was transferred, or check that the file wasn’t corrupted during copy.

The image mounts but shows “not enough space.” If you chose a fixed-size image (not sparse), you may have filled it. You can’t resize a fixed image—create a new, larger one and copy your files over.

Disk Utility won’t let me create an image. Restart your Mac and try again. If the problem persists, check that you have enough free disk space—the image creation needs temporary space.

Frequently Asked Questions

Does encrypting a folder slow down my Mac?

Only when you’re copying files in or out of the encrypted image—the encryption/decryption takes a little CPU time. Once the image is mounted and you’re working with files, the performance is nearly identical to a normal folder.

Can I encrypt a folder without creating a disk image?

macOS doesn’t offer a direct “encrypt this folder” button. The disk image method is the built-in way. Alternatively, you could put the folder inside an encrypted sparse image (as described) or use FileVault to encrypt your entire disk, which encrypts everything on your startup drive.

What’s the difference between 128-bit and 256-bit AES?

Both are secure—256-bit is technically stronger, but 128-bit is considered uncrackable with current technology. The practical difference is that 256-bit is slightly slower on older Macs. For most personal data, 128-bit is fine.

Can I encrypt a folder on an external drive?

Yes, the same steps work—just save the .dmg file to the external drive. However, if the external drive is formatted for Windows (like NTFS), you may not be able to create a disk image on it. Use a Mac-formatted drive (APFS or Mac OS Extended) for best results.

What happens if I lose the .dmg file?

If you lose the encrypted image file itself, the data is gone—there’s no way to recover it. Keep a backup of the .dmg file in a safe place (like a cloud service or external drive).

Is this the same as FileVault?

No. FileVault encrypts your entire startup disk, so everything on your Mac is protected when it’s off. Encrypting a folder with Disk Utility protects only that specific folder, even if your Mac is on and unlocked. You can use both—FileVault for whole-disk protection, and encrypted folders for sensitive files you want to lock individually.