How Do I Password Protect My Files & Folders In macOS?

This articles explains how you can password protect your folders and files on your Mac. You can assign passwords for files and folders. Everyone must enter to open the file or folder because the contents of your locked files or folders will be hidden.

Important note: Although password protecting requires different steps for different file and folder types, it is common for most of them the that there’s no way to recover your password if you forget it.

This article has two parts: (1) how to lock a folder (2) how to lock a file

See also: Slow iCloud Keychain?

1. Password Protect Folders

By following the steps below, you will create a password protected disk image (DMG) folder on a Mac. If you want to password protect files certain files like images etc, you may place them in password protected folders.

In this tutorial, we are password protecting a folder called macReports.

1. Open Disk Utility (Applications / Utilities / Disk Utility).

disk utility

2. In Disk Utility, go to File > New Image > Image from Folder…

disk utility image from folder

3. Now, select the folder you want to password protect. In our example, it is the macReports folder, and click Choose

password protect folder

4. You can save this new folder as anything you want. Select where you want to save this folder. You can name it anything you wish. Encryption, select “128-bit AES Encryption (Recommended)” and image format, select “read/write”. When you select the encryption, you will be asked to enter a password. Enter your desired password and click Choose.

enter your password


password protect folder

5. And after that, click Save. Disk Utility will say ” Creating folder disk image “macReports.dmg”. It may take several seconds, when it is completed, click Done. Now, you may wan to delete the original folder.

2. Password Protect Files

You can also password protect individual files, if you prefer. But the process is different for different file types. here is how:

Password Protect your Notes

See also: How to create text files

Please note that the Notes app uses a one (single) password to lock all notes. Here is how:

1. Open the Notes app on your Mac

2. Create or select an existing note to lock

3. Click the padlock icon and select Lock Notepassword notes

4. You will be asked to enter your password. It is also recommended that you enter a password hint. The hint will be displayed after you entered a wrong password three times. All of your other Apple devices (iOS, iPhone or iPad and macOS) will use this password if they are using the same iCloud account.

5. Click Set Passwordpassword protect notes

To remove a Notes password, again click the padlock icon and and select Remove Lock.

Password Protect PDF Files in Preview

You can password protect PDF files in the Preview app (PDF won’t open?). Here is how:

1. Open the PDF file you wish to password protect in Preview

2. Go to File > Export

preview export

3. Select the “Encrypt” box, enter your password and click Save.

password protect pdf in preview

4. Next time you want to open this file you will need to enter its password.

Note that you can password protect other file types using this method. You can simply convert your files to PDF files in Preview by going to File > Export as PDF.

Password protect Pages documents, Keynote presentations and Numbers files 

In this article, we are further showing how you can password-protect a Pages document. The steps are identical for Keynote and Numbers as well. Here is how:

1. Open the Pages, Numbers or Keynote file you wish to password protect and go to File > Set Password

pages set password

2. A new window (require a password to open this document) will appear. Enter your password. You may want to enter a hint also. If you are using the Keychain app, you may want to check the “Remember this password in my keychain” box so that you can add the password to your keychain.

require a password

As stated above, you can use the same steps to password protect Keynote presentations and Numbers files.

You can also change or remove your password protected Pages, Keynote and Numbers files by going to Choose File > Change Password. And enter your password, after that you can change or remove the password.

Dr. Serhat Kurt worked as a Senior Technology Director. He holds a doctoral degree (or doctorate) from the University of Illinois at Urbana / Champaign and a master’s degree from Purdue University. Here is his LinkedIn profile.

Thank you for choosing to leave a comment.

Please note the following:

  • All comments are moderated.
  • Your email will NOT be published nor shared.
  • All SPAM comments will be deleted.
  • Please see our comment policy page for more info.

3 thoughts on “How Do I Password Protect My Files & Folders In macOS?”

  1. Attempting to password protect a newly created note does not work; all options under lock icpon a greyed out.

    Attempting to password protect a PDF document seems to work, but no password is required to subsequently open the file.


Leave a Comment