If you share your Mac with family members or colleagues, you likely have personal files, financial documents, or sensitive work data that you wish to keep private. While there are countless third-party applications available on the App Store promising to lock your folders, macOS actually includes a powerful, built-in tool that can encrypt and password-protect your files for free.
Instead of locking the folder directly, macOS allows you to turn the folder into an encrypted disk image using the Disk Utility application. This creates a secure, password-protected “vault” file. When you enter the correct password, it mounts like a standard USB drive, allowing you to view and edit your files. When you eject it, your data is completely locked away.
Step 1: Open Disk Utility
Disk Utility is a pre-installed system application used for managing hard drives and storage volumes.
- Open Finder.
- Navigate to the Applications folder, then open the Utilities folder.
- Double-click on Disk Utility to launch the application. Alternatively, you can press Cmd + Space to open Spotlight Search, type “Disk Utility”, and press Enter.
Step 2: Create the Encrypted Image from Your Folder
Once Disk Utility is open, you can convert your existing folder into a secure image.
- In the menu bar at the very top of your screen, click on File.
- Hover over New Image, then select Image from Folder.
- A file browser window will appear. Navigate to the folder you want to protect, select it, and click Choose.
Step 3: Configure the Encryption Settings
A new settings dialogue box will appear where you will configure how your protected folder behaves and how secure it will be.
- Save As: Choose a name for your new protected file (e.g., “SecureVault”) and select where you want to save it.
- Encryption: Click this dropdown and select 128-bit AES encryption. This is highly secure and fast. (256-bit is slower but even more secure; 128-bit is perfectly sufficient for personal use).
- Password: As soon as you select the encryption type, you will be prompted to enter and verify a new password. Do not forget this password. There is no way to recover your files if it is lost. Click Choose once entered.
- Image Format: Click this dropdown and change it to read/write. This is crucial; if you leave it as “compressed” or “read-only”, you will not be able to add new files to the folder later.
Step 4: Save and Test the Encrypted Folder
Click the Save button. Disk Utility will process the folder and create a new file with a .dmg extension. Once the process is complete, click Done.
You can now test your new secure vault:
- Double-click the new
.dmgfile you just created. - macOS will immediately prompt you for the password you created in Step 3.
- Enter the password and click OK.
- The folder will mount on your desktop or in Finder sidebar under “Locations”, just like a plugged-in USB stick.
- You can now open it, add new files, and edit existing documents.
Crucial Final Steps
When you are finished working with your files, you must eject the disk image to lock it again. Right-click the mounted drive on your desktop (or in the Finder sidebar) and select Eject.
Finally, remember that creating this encrypted .dmg file does not automatically delete your original, unprotected folder. Once you have verified that your new encrypted vault works correctly and contains all your files, you should manually drag the original folder to the Trash and empty it to ensure the data is secure.