Password Protect Folders & Files in Mac OS X with Encrypted Disk Images
You can password protect files and folders in Mac OS X by using a trick with disk images. Here’s how it works; by placing files inside of an encrypted disk image, that disk image will work like a password protected folder and require a password before it’s mounted, preventing unauthorized access to all of the contents.
How to Password Protect Files & Folders in Mac OS X with Disk Images
Do this along with general password protection for maximum effect.
- Launch “Disk Utility” located in /Applications/Utilities
- Click on the “New Image” button at the top of the app
- Name the disk image and set a file size that is appropriate for what you intend to store in there
- Click on the contextual menu alongside “Encryption” and choose either 128 or 256-bit encryption (256 is stronger)
- Click “Create”
- At the next screen you will set a password to access the folder – do not lose this password, you will not be able to open the disk image if you do
- Optional: Uncheck the box next to “Remember password in keychain” – only do this if you’re the only user on the Mac, otherwise anyone can open the image without the password
- Click “OK” to create the disk image
The encrypted disk image is now created. Now you need to locate the image, mount it which will require the password set in the creation process, and drag files and folders into the mounted image that you want password protected. The default location for new disk images is the Desktop, but if you saved it elsewhere, look there instead.
Once you are finished copying files and folders to the mounted disk image, eject it like any other disk and the contents will be safely protected within, requiring the password to access again. Because the files and folders have been copied, you’ll probably want to delete the originals so they aren’t visible to anyone else.
Again, do not lose the password set or you will not be able to get access to the contents of the encrypted disk image.
Filevault also provides encryption and security features, but older version have some potential speed drawbacks that are particularly noticeable on non-SSD drives, this is mostly a non-issue for OS X Lion and newer, including all modern macOS releases like Mojave, High Sierra, Sierra, El Capitan, Mavericks, and later releases, and most Macs with a SSD drive.
Update: There is a new and easier method of adding password protection by encrypting folders in Mac OS introduced from Mac OS X Mountain Lion and persisting in modern macOS releases onward.