If you share a Mac with family members or frequently travel with a MacBook containing sensitive financial documents, leaving your files sitting in a standard folder is a massive privacy risk. While you can lock your entire Mac with a user account password, sometimes you need to secure a specific folder full of highly confidential files.
Surprisingly, macOS does not have a native “right-click to password protect” feature for standard folders. However, Apple does provide a brilliant, built-in workaround using Disk Utility. By creating an encrypted disk image, you can create a secure, password-protected virtual folder that behaves exactly like a USB drive.
What is an Encrypted Disk Image?
Instead of locking a traditional folder, you are going to create a .dmg file (a disk image). When you double-click this file, macOS will ask you for a password. If you enter the correct password, the image will “mount” and appear on your desktop as a temporary drive.
You can drag and drop files into this drive, edit them, and save them normally. When you are finished, you simply “eject” the drive. The drive vanishes from your desktop, and all your files are instantly locked safely back inside the heavily encrypted .dmg file.
How to Create the Secure Folder
You do not need to download any third-party software to accomplish this; everything you need is already installed on your Mac.
- Open your Applications folder, scroll down to the Utilities folder, and open the Disk Utility application. (Alternatively, press Command + Space to open Spotlight and search for “Disk Utility”).
- In the very top menu bar of your screen, click on File.
- Hover over New Image and select Image from Folder… (or Blank Image… if you want to create an empty secure container from scratch). For this guide, select Blank Image….
- A configuration window will appear. First, type a name for your secure container in the Save As field (e.g., “FinancialRecords”).
- Choose where you want to save the .dmg file (e.g., your Desktop or Documents folder).
- In the Name field, type the name that will appear when the drive is unlocked and mounted on your desktop.
- In the Size field, specify how large you want the container to be (e.g., 500 MB or 2 GB). Make sure you allocate enough space for future files, as this size cannot be easily changed later.
Configuring the Encryption Settings
The next steps are critical for ensuring your new container is actually secure.
- Click the Format drop-down menu and select APFS (or Mac OS Extended (Journaled) if you are running a very old version of macOS).
- Click the Encryption drop-down menu and select 256-bit AES encryption. This is military-grade encryption and is highly recommended for sensitive data.
- A password prompt will immediately appear. Type a strong password, verify it, and click Choose. Warning: If you forget this password, there is absolutely no way to recover your files.
- Click the Image Format drop-down menu and select read/write disk image. This allows you to add and remove files freely.
- Click Save. Disk Utility will take a few moments to generate and encrypt the container.
How to Access Your Secure Files
Once Disk Utility finishes, you will see a new .dmg file in the location you chose earlier.
- Double-click the
.dmgfile. - A prompt will appear asking for your password. Enter the password you created earlier. Important: Ensure the “Remember password in my keychain” box is unchecked, otherwise anyone who logs into your Mac account can open the folder without a password.
- Click OK.
- The container will mount, and a new drive icon will appear on your desktop or in your Finder sidebar.
- Open this drive and move your sensitive files inside.
How to Lock the Folder Again
When you are finished viewing or editing your secure documents, you must lock the container.
To do this, simply locate the mounted drive on your desktop, right-click it, and select Eject (or click the small eject icon next to it in the Finder sidebar). The drive will disappear, and your files will be safely locked back inside the encrypted .dmg file, completely inaccessible to anyone without the password.