# Password protecting a Mac folder – here’s how

To protect documents, pictures, and any other files containing sensitive data from unauthorized access, you can lock or password protect a Mac folder. We’ll explain how this works with the help of our step-by-step guide including helpful [screenshots](https://www.ionos.com/digitalguide/server/configuration/how-to-take-a-screenshot-on-a-mac/ "How to take a screenshot on a Mac").

## A step-by-step guide for how to lock a folder on a Mac.

To password protect a Mac folder, you must first create an image of that folder and then protect it with a password.

---

### Note

The image referred to in this context is an Apple Disk Image file not a screenshot. This file behaves like a volume or a device connected to the Mac and can be **recognized by its .dmg extension**.

---

The following steps are required to lock a folder in macOS:

**Step 1**: First, create a folder (on your desktop or anywhere else on your Mac) that contains all the files you want to lock.

[![Image: Example of a new folder on macOS desktop](https://www.ionos.com/digitalguide/fileadmin/_processed_/c/7/csm_EN-mac-verschluesseln-step-1-new-folder_9a8b807a2f.webp "Example of a new folder on macOS desktop")](https://www.ionos.com/digitalguide/fileadmin/DigitalGuide/Screenshots_2020/EN-mac-verschluesseln-step-1-new-folder.png) Create a new folder - for example on the desktop.       **Step 2:** Open the Disk Utility app. The fastest way to do this is to search for “Disk Utility” in Spotlight Search:

[![Image: Spotlight Search in macOS: Hard Disk Utility](https://www.ionos.com/digitalguide/fileadmin/_processed_/1/3/csm_EN-mac-verschluesseln-step-2-disk-utility_52a42e539b.webp "Spotlight Search in macOS: Hard Disk Utility")](https://www.ionos.com/digitalguide/fileadmin/DigitalGuide/Screenshots_2020/EN-mac-verschluesseln-step-2-disk-utility.png) Open the Disk Utility via Spotlight search.       Finally, press the Enter key to open the program.

**Step 3**: Select “File” from the upper menu bar, followed by “New Image” and finally “Image from Folder...”. Using the right Mac shortcut will help you to perform this action a bit faster.

[![Image: Create a new image in Disk Utility](https://www.ionos.com/digitalguide/fileadmin/_processed_/6/3/csm_EN-mac-verschluesseln-step-3-image-from-folder_6719eadfd2.webp "Create a new image in Disk Utility")](https://www.ionos.com/digitalguide/fileadmin/DigitalGuide/Screenshots_2020/EN-mac-verschluesseln-step-3-image-from-folder.png) Navigate via the menu bar to “Image from folder...”.       **Step 4**: In the window that opens, select the required folder:

[![Image: Select Folder in Hard Disk Utility](https://www.ionos.com/digitalguide/fileadmin/_processed_/e/3/csm_EN-mac-verschluesseln-step-4-select-folder_033f12ce40.webp "Select Folder in Hard Disk Utility")](https://www.ionos.com/digitalguide/fileadmin/DigitalGuide/Screenshots_2020/EN-mac-verschluesseln-step-4-select-folder.png) Select the folder you want to password protect on your Mac.       **Step 5**: A window will open which allows you to enter the new file name, add tags (optional), and choose where you want to save it. The most important part of this step is to choose which level of encryption you want. Select 256-bit AES encryption. This is currently the most secure method - not only for locking a Mac folder. It doesn’t take much longer than 128-bit AES encryption.

[![Image: Adjust settings for encryption](https://www.ionos.com/digitalguide/fileadmin/_processed_/5/d/csm_EN-mac-verschluesseln-step-5-select-encryption_cc861a0b72.webp "Adjust settings for encryption")](https://www.ionos.com/digitalguide/fileadmin/DigitalGuide/Screenshots_2020/EN-mac-verschluesseln-step-5-select-encryption.png) Select the 256-bit AES method for encryption.       **Step 6**: Another window will open in which you can set a password for the folder or image file.

[![Image: Set password for Mac folder](https://www.ionos.com/digitalguide/fileadmin/_processed_/1/8/csm_EN-mac-verschluesseln-step-6-select-password_b90d7c3934.webp "Set password for Mac folder")](https://www.ionos.com/digitalguide/fileadmin/DigitalGuide/Screenshots_2020/EN-mac-verschluesseln-step-6-select-password.png) Set a password for your Mac folder.       ---

### Tip

To password protect a Mac folder, choose a **secure password** that is at least eight characters long and contains a combination of lowercase and uppercase letters, numbers, and special characters. **Avoid using** **words or dates** **that can easily be associated with you** - such as your last name, a date of birth, or zip code.

---

**Step 7**: Confirm your password by clicking “Choose” and then “Save” in to create your password-protected folder using the Disk Utility.

[![Image: Confirm entries in the hard disk utility](https://www.ionos.com/digitalguide/fileadmin/_processed_/d/f/csm_EN-mac-verschluesseln-step-7-confirm-password_ac9376caa5.webp "Confirm entries in the hard disk utility")](https://www.ionos.com/digitalguide/fileadmin/DigitalGuide/Screenshots_2020/EN-mac-verschluesseln-step-7-confirm-password.png) Confirm your choices to start password protecting your files on your Mac.       **Step 8**: Once the process is complete, you can confirm by clicking on “Done”. The password protected folder can now be found where you chose to save it.

[![Image: Completed encryption in the hard disk utility](https://www.ionos.com/digitalguide/fileadmin/_processed_/c/6/csm_EN-mac-verschluesseln-step-8-confirm-done_c4c099ca7c.webp "Completed encryption in the hard disk utility")](https://www.ionos.com/digitalguide/fileadmin/DigitalGuide/Screenshots_2020/EN-mac-verschluesseln-step-8-confirm-done.png) Confirm the creation of the .dmg file by clicking the “Done” button.       **Important!** After you’ve completed these steps, delete the original folder because it is not locked. Your files will still be in the password protected folder.

## Working with a password protected Mac folder

To access the data in your newly created locked folder, double click on it and enter the password.

[![Image: Encrypted Mac Folder: Password Entry](https://www.ionos.com/digitalguide/fileadmin/_processed_/3/9/csm_EN-mac-verschluesseln-9_6893c2a91c.webp "Encrypted Mac Folder: Password Entry")](https://www.ionos.com/digitalguide/fileadmin/DigitalGuide/Screenshots_2020/EN-mac-verschluesseln-9.png) To open the .dmg file, enter your password.       If you no longer need the password protected folder, be sure to eject the .dmg file. Otherwise the data can be retrieved without a password. Ejecting the file is easy: just drag it to the trash bin.

[![Image: Context menu of image file](https://www.ionos.com/digitalguide/fileadmin/_processed_/9/9/csm_EN-mac-verschluesseln-10_d35ecd4aa4.webp "Context menu of image file")](https://www.ionos.com/digitalguide/fileadmin/DigitalGuide/Screenshots_2020/EN-mac-verschluesseln-10.png) Eject the image file if you don’t need it anymore.


This is a markdown version of: [https://www.ionos.com/digitalguide/server/configuration/mac-folder-password/](https://www.ionos.com/digitalguide/server/configuration/mac-folder-password/) for AI/LLM consumption.