This article was co-authored by wikiHow staff writer, Megaera Lorenz, PhD. Megaera Lorenz is an Egyptologist and Writer with over 20 years of experience in public education. In 2017, she graduated with her PhD in Egyptology from The University of Chicago, where she served for several years as a content advisor and program facilitator for the Oriental Institute Museum’s Public Education office. She has also developed and taught Egyptology courses at The University of Chicago and Loyola University Chicago.
This article has been fact-checked, ensuring the accuracy of any cited facts and confirming the authority of its sources.
This article has been viewed 530,289 times.
Learn more...
Do you have a file or folder on your Mac that you’d like to keep safe from prying eyes? There are several easy ways to encrypt files on a Mac, using either your computer’s built-in security features or third-party software. In this article, we’ll show you how to password protect entire folders or individual files using a variety of different methods.
Quick Steps for Password-Protecting Files on a Mac
- Create a new folder and place the files you want to protect inside.
- Open Disk Utility.
- Go to File > New Image > Image from Folder.
- Browse for your folder and click Choose.
- Select an encryption type, enter a password, and click Choose.
- Click Save > Done.
- Double-click your encrypted DMG file and enter the password to open it.
Steps
Password Protecting a Folder with Disk Utility
-
Place the files you want to encrypt in a folder. To create a new folder, right-click or Ctrl-click the desktop or a blank area in the Finder, then select New Folder from the pop-up menu. Click the new folder to select it, then click the default name of the folder and type in whatever name you like. Drag and drop or copy and paste the file(s) you want to encrypt into the folder.
- This method allows you to turn the folder into a password-protected disk image, or DMG file. You can only open these types of files on a Mac.
-
Open Disk Utility. You can either do this by finding it in Finder > Applications > Utilities or by searching for disk utility with the Spotlight Search tool in the menu bar at the top of the screen.Advertisement
-
Select New Image from the File menu. At the top of the screen, click File and hover over New Image. A menu will pop out.
-
Click Image from Folder. This will open a Finder window where you can browse for your folder.
-
Select your folder and click Choose. A new window will open with options for saving your DMG file.
-
Choose the level of encryption you want in the Encryption menu. Click the dropdown next to the Encryption header and select an option. Either option will work, but Apple recommends 256-bit AES encryption.
- You can also use this window to set other options, such as the name and location of the encrypted folder and whether the folder is compressed, read only, read/write, etc. Selecting compressed for the folder type will create a simple encrypted archive with your files inside.
-
Enter a password when prompted. A window will pop up asking you to enter a password as soon as you choose an encryption type. Type in the password, enter it again in the Verify field, then click Choose.
-
Click Save. The encrypted folder will be saved in the location you specified. It may take a few seconds for the process to complete. Click Done once the status window tells you the operation was successful.
-
Double-click the DMG and enter the password to open it. Your encrypted folder will look like a regular DMG file, which resembles an image of a hard drive. Double-click it, then enter your password when prompted. You’ll also have the option to add the password to your Mac’s keychain so you can easily look it up if you forget it.
Adding Passwords to Pages, Numbers, and Keynote Docs
-
Open the file you want to password protect. Several of your Mac’s built-in apps have a feature that lets you password protect individual documents. You can do this in apps like Pages, Numbers, Keynote, and Notes. The basic process is the same for most of these apps. To get started, launch the app and open the file you want to lock with a password.[1]
-
Open the File menu and select Set Password. A new window will open.
-
Enter and verify your desired password. In the window that opens, type in the password you want to use, then enter it again in the Verify field. If you want, you can also enter a password hint. Click Set Password when you’re done.
- If you don’t want to type in the password every time you open the file, check the box next to Open with Touch ID.
- Next time you try to open the document, you’ll be prompted to enter your password (or use Touch ID, if you have that option enabled).
- To change a document password, open the document and select File > Change Password. You can also remove the password from the Change Password menu.
-
Use the Lock Note option to password protect a Note. Notes work a little differently from other Apple files. To password protect a Note, open the Note, then go to File > Lock Note. You can either choose to use the login password for your Mac user account, or create a new password just for that Note.
Using Terminal to Create an Encrypted ZIP File
-
Enter the command zip -er YOURFILENAME.zip, followed by a space. Replace “YOURFILENAME” with whatever you want to call your encrypted zip file. Don’t press Return yet–instead, enter a space after the command.
-
Drag and drop your folder into the Terminal window and press ⏎ Return. You should see a path to the folder appear in Terminal after the command you entered. Press Return to execute the command.
-
Type in your desired password for the encrypted folder. After you type it, press Return. When prompted to verify, retype the password and press Return again. You won’t be able to see the password you typed in the Terminal window. Depending on how much data you are trying to compress, the process may take a few moments to complete.
- By default, the file you create will appear in Macintosh HD > Users > [your username].
- To open the file, double-click on it and enter the password when prompted, then click OK.
Community Q&A
-
QuestionHow I can open the utility disk and see the hidden information?Community AnswerAfter hitting "eject," the disk image you created goes away. To reopen it, find that .dmg file that was created, and it will request you to enter the password. Then the disk image will reappear.
-
QuestionIf I later move this map to an external source, USB or other hard-drive, will the map and files still be coded?Community AnswerYes, they will. It works the same as a zip file. The only downside is that you can only open it on Macs. For Windows you will need additional software.
-
QuestionWhy was another "operating drive" icon created on my desktop that I can't get rid of?Community AnswerThe only reason for this would be that the computer recognized another drive, maybe a time machine backup drive? If not, this could be an SSD or a flash drive, or an SD card that may be in your computer. If this is the system drive duplicated, this would be a partition issue. To view the drives on a Mac, go to Spotlight (the search icon in the top right corner) then search for the app titled "Disk Utility." Here you can view all the drives you have active, and also preform first aid and corrections if a drive is improperly partitioned. If this is a time machine drive, navigate to the Time Machine app to manage these preferences.
Video
Tips
References
About This Article
Reader Success Stories
-
"I followed the article's instructions and created a password-protected folder. After deleting the original folder, the secure folder didn't ask for a password. Do I have to restart my laptop every time to maintain its security? I restarted once already."..." more