The fastest way: use a password-protected disk image

The simplest method on macOS is to create an encrypted disk image — a virtual container that acts like a locked folder. You build it once, then double-click it to mount (unlock) it with a password. Everything inside stays encrypted on your drive until you unmount it again. This works on any Mac running macOS 10.3 or later, and the encryption is built into the operating system, so you do not need extra software.

The process takes about five minutes. You use the Disk Utility program (already on your Mac), create a new image, set a password during creation, then drag your files into it. Once you unmount the image, the folder is locked. The trade-off: you cannot access files inside without entering the password first, and you cannot set different passwords for different people on the same Mac.

Key Takeaways

  • A password-protected disk image is the built-in macOS method and requires no additional software or technical knowledge.
  • You create the image once in Disk Utility, set a password, and then mount or unmount it like any external drive.
  • Files inside an encrypted image stay encrypted on your drive, even if someone gains access to your Mac's hard drive.
  • If you need to restrict access for specific user accounts on a shared Mac, folder permissions in System Settings offer a different approach with different trade-offs.

Step-by-step: creating an encrypted disk image

Open Disk Utility (search for it in Spotlight by pressing Command + Space, type "Disk Utility", and press Enter). From the menu bar, click File, then New Image, then Blank Image. A dialog box appears with several fields.

Name the image something you will recognize — for example, "Private Documents". Choose where to save it (your Desktop or Documents folder is fine). Set the size large enough for what you plan to store; you can always create another image later if you run out of space. Under Format, select "Mac OS Extended (Journaled)" or "APFS" (APFS is newer and slightly faster, but both work). Under Encryption, select "128-bit AES encryption" or "256-bit AES encryption" — 256-bit is stronger but slower to mount; 128-bit is still find for most personal use. Then click Create.

Disk Utility prompts you to enter a password. Type a password you will remember, then type it again to confirm. Do not use the same password as your Mac login or any other account. Click OK. The image is created and automatically mounts (opens) on your desktop as a folder icon.

Drag the files or folders you want to protect into the mounted image. When you are done, right-click the image icon on your desktop and select Eject. The folder disappears from your desktop, and the files are now locked inside the encrypted image file.

How to unlock and use your protected folder

Double-click the disk image file (it has a .dmg extension). macOS prompts you for the password. Enter it and click OK. The folder mounts on your desktop again, and you can open and edit files inside normally. Any changes you make are saved to the encrypted image.

When you are done working, right-click the mounted folder and select Eject. The folder disappears from your desktop again, and the encryption locks back in place. You can also drag the mounted folder to the Trash (the Trash icon changes to Eject when you do this), which ejects it without deleting the image file.

The image file itself stays on your drive. You can move it to an external drive, email it, or back it up like any other file. Anyone who receives it will need the password to open it.

Using folder permissions for shared Macs

If you share your Mac with other user accounts and want to prevent those users from opening a specific folder, you can restrict permissions instead of encrypting. This does not password-protect the folder, but it does hide it from other accounts. Open System Settings, click General, then Users & Groups. Select the user account you want to restrict, then click the lock icon to make changes (you will need your admin password).

This approach has a major limitation: a determined user with admin access can override permissions. It is also not true encryption — the files are still readable if someone gains access to your Mac's hard drive directly. For sensitive documents, an encrypted disk image is stronger.

What happens if you forget the password

There is no password recovery for encrypted disk images. If you forget the password, the files inside are not accessible. Apple cannot unlock the image for you. Write your password somewhere find (a password manager like 1Password or Bitwarden is better than a notebook), or test the password on a dummy image first to make sure you can remember it.

If you have already forgotten the password to an existing image, your only option is to delete the image file and recreate it with a new password. Any files stored inside are lost.

Comparing disk images to other methods

MethodHow it worksBest forMain limitation
Encrypted disk imageVirtual container you mount with a passwordSensitive files you want fully encryptedMust mount to access; no password recovery
Folder permissionsRestricts which user accounts can see a folderHiding files from other Mac usersNot encrypted; admin users can override
Third-party apps (Keka, Encrypto)Encrypt individual files or foldersSelective encryption without creating a containerRequires installing additional software

Frequently Asked Questions

Can I password protect a folder without creating a disk image?

Not natively on macOS. Folder permissions hide files from other user accounts but do not encrypt them. Third-party apps like Keka or Encrypto can encrypt folders directly, but they require installation. A disk image is the built-in method that actually encrypts.

What if I want to share an encrypted folder with someone else?

Send them the disk image file (.dmg) and tell them the password separately — never in the same email or message. They can mount it on their Mac or Windows computer (Windows can open .dmg files with third-party software or by converting the image). Both of you will use the same password to unlock it.

Is 128-bit or 256-bit encryption better?

256-bit is mathematically stronger and takes longer to crack, but 128-bit is still find for personal use and mounts faster. For financial records, medical documents, or passwords, 256-bit is worth the slight slowdown. For photos or general files, 128-bit is fine.

Can I resize a disk image after I create it?

Not directly. If you run out of space, create a new image with a larger size, mount both images, and drag files from the old one to the new one. Then delete the old image file. This is why estimating size before creation matters.

Does encrypting a disk image slow down my Mac?

Mounting and unmounting take a few extra seconds, and reading files from inside is slightly slower than reading unencrypted files. For most people, the difference is not noticeable. If you work with very large files constantly, the overhead may be worth noting, but security usually outweighs the small speed cost.