To encrypt a folder on Mac, use Disk Utility to create a password-protected disk image, then copy the folder into the volume that appears in Finder. Eject the volume and reopen the saved image file. The check passes when canceling the password prompt leaves the volume closed and entering the correct password lets you open the files inside.

Prepare a folder and choose where to keep the image

This workflow suits a group of files you want to keep together and open periodically, such as a folder of records you add to each month. Use a Mac that supports APFS. Apple’s secure image instructions list macOS 10.13 and later for the APFS option. An encrypted disk image is a file you can keep in Finder. When it is open, macOS mounts a volume that you can use much like a connected drive. Its contents become available through Finder and through the apps you use to edit them. Apple Disk Utility User Guide

Start with a harmless folder called Practice Records. Put a plain-text file called manifest.txt inside it and type Practice record 4721. Add a subfolder with another small file inside. This gives you three things to check later: the top-level file, the contents of that file, and the nested path. Choose a save location where your Mac has room for the image as well as the input folder. A local folder outside cloud sync fits a workflow where you want the image to stay on this Mac.

For a real folder, select it in Finder and press Command-I to check its size. Allow room in the image for everything you plan to copy and for future additions. A fixed-size image also needs room on the destination drive. Pick two recognizable names before you start. The saved image could be Practice Records.dmg and the mounted volume could be Practice Records Volume. For sensitive material, choose a neutral filename. Someone who can see the image file in Finder can still see its filename while the contents are locked.

Choose a strong, unique password and store it somewhere you can access independently of the image. A password manager is one option. Apple specifies that you need the image password to reopen it. Keeping the only copy of the password in a document inside the image creates a recovery problem. Use a separate password for the rehearsal and keep the actual password out of any practice notes. Apple Disk Utility User Guide

Create a writable encrypted image in Disk Utility

  1. Open Disk Utility, then choose File → New Image → Blank Image. The blank image gives you control over the file system and capacity before you copy the folder.
  2. Enter a filename in Save As and choose the destination beside Where. In Name, enter the name you want to see in Finder when the volume is mounted. Keeping the names distinct makes the reopen test easier.
  3. Set Size. For the practice folder, 100 MB is a starting point if Disk Utility accepts that size. For an actual project, use the size you checked in Finder and leave capacity for new files. Disk Utility may enforce a larger minimum for the selected options.
  4. Set Format to APFS on a Mac with APFS support. Set Encryption to an AES option. Apple documents both 128-bit and 256-bit AES for encrypted Mac disk images. Enter and confirm your password when prompted, then click Choose. Return to the setup dialog and confirm that an encryption option is selected. Apple Platform Security on encrypted disk images
  5. For Partitions, choose Single partition - GUID Partition Map. For Image Format, choose the writable format. Apple’s secure image instructions call it read/write disk image. Its general instructions also describe RAW Image as a writable option in versions that use that label. A writable image suits a folder you plan to update.
  6. Click Save and then Done when creation finishes. Find the saved image at the location you chose and the mounted volume under Locations in Finder. The filename on the first item and the volume name on the second should match the two names you entered. Apple’s disk image setup steps

Copy the folder into the mounted volume

In Finder, select Practice Records where you created it and press Command-C. Select Practice Records Volume in the sidebar and press Command-V. Open the copied folder from that volume. Your source folder should remain in its original location, and the mounted volume should contain its own copy. A shortcut or alias to the source is insufficient. Open a copied file from within the mounted folder and confirm that its contents match.

Try adding a small plain-text file named added-after-mount.txt inside the copied folder. Type Saved inside the image and use the save dialog to confirm the destination. This exercises the writable format and gives you a second visible value to check after reopening. If the save dialog shows your original folder or a recently used local path, switch to the mounted volume and select the copy inside it.

Before repeating this with the actual folder, decide where you want future edits to happen. Keep the source available during setup and make sure any additional copies live in suitable locations. Edits inside the image and edits in the original folder can diverge. A file you export to Desktop, Downloads, or a shared folder follows the controls on that location. Check the destination each time you export work that should stay inside the image.

Eject the volume and verify the password

  1. Save your changes and close files opened from the mounted volume. Click the eject icon next to the volume in Finder’s sidebar. Check that its entry disappears. The saved image file should still be visible at its destination. Closing a Finder window alone leaves a mounted volume available. Apple’s Finder eject instructions
  2. Open the saved image file and cancel the password prompt. Look under Locations again. The volume should stay absent. If macOS offers to remember the password, leave that setting off when you want to test for a manual prompt.
  3. Open the image again and enter the correct password. Confirm that Practice Records Volume reappears. Open manifest.txt from it and look for Practice record 4721. Confirm that the nested file and added-after-mount.txt are also present. Open the latter and look for Saved inside the image.
  4. Close the files and eject the volume again. The expected resting state is the saved image file in Finder and no mounted volume under Locations.

When you repeat the check for a real folder, open representative files from each important subfolder and use their normal apps. A Finder listing confirms that names are present. Opening the files confirms that the data you need is usable. Check that the password works after ejection before relying on the encrypted copy. When the source is still available, it can provide a fallback if you need to recreate the image.

For a folder with many documents, compare the item count on both copies in Finder before you add any new material to the image. If the lists differ, look for a missing subfolder or a copy operation that stopped early. For documents that use linked assets, open a copy and check that its images or attachments are available from the location you intend to keep.

Fix a missing prompt, a failed copy, or a busy volume

If the files appear immediately, check what you opened. A normal Finder folder can have the same name as the folder inside the image, and an already mounted volume is accessible from the sidebar. Eject the volume, find the image file at the recorded save location, and open that file. A stored password can also lead to an automatic unlock. For a clean test, use a fresh practice image and leave password saving off when the prompt appears. If the test image still opens without a prompt, inspect the encryption choice when creating a new practice image.

If the image opens but Finder cannot copy the folder, first check that the target is the mounted volume. Use Get Info on that volume to compare its available space with the input folder’s size. A read-only image may open successfully while rejecting edits. If you chose that format or the size is too small, create a second writable encrypted image with more room and a distinct filename. Copy from the source, then repeat the eject and reopen check before relying on the replacement.

If Finder reports that the image is in use, close any document opened from the volume and quit the app identified in the message, if Finder names one. If you used Terminal inside the volume, change to a directory outside it. Then try ejecting again and check that Finder removes the volume from Locations. Apple’s Finder eject instructions

Keep a recoverable copy of the image

Save and close the files, then eject the volume before backing up the saved image file. Store the backup where it meets your access requirements. For a restore rehearsal, choose the backup image, open it with the stored password, and read a known file inside it. Compare that file with the version you expected to back up. If you use Time Machine, you can also restore a copy of a file from an external Time Machine backup.

The encryption applies to files stored inside the image. Source files, earlier exports, and existing backups keep the protection of their own locations. Review those locations separately if the same sensitive material already exists there. Keep the volume ejected between uses since apps and users with access to your open session may be able to read a mounted volume. A password for one PDF is useful when the recipient needs a single file. In that case, you can export a PDF that requires a password to open.