How to Password Protect a Folder on Mac : Lock a Folder

How to lock a folder on mac

This site contains affiliate links. As an Amazon Associate, We earn a commission from qualifying purchases at no extra cost to you.

Protecting sensitive and confidential information, like financial records, personal documents, or work-related files, on your Mac is essential.

The easiest way to safeguard your files is to password-protect folders on your Mac. You can do that by restricting access to specific files and folders, providing an extra layer of security.

In this article, we will show you how to password-protect a folder on Mac to prevent unauthorized access. We will discuss step-by-step instructions on using built-in tools like Terminal and Disk Utility and third-party tools to password-protect your confidential folders. 

Let’s dive right into it.

How to Lock a Folder on Mac [Best Way]

The best way to lock a folder on Mac is through Disk Utility. To do that, open the utility and select New Image > Image from Folder. Choose the folder you want to lock, select read/write for the Image Format, select the 128-bit AES encryption from the Encryption tab, set a strong password, and Save.

How to Lock a Folder on Mac

To access the folder’s contents, double-click it and enter your set password. Others cannot access the folder without the password. So, your password protected files will remain safe even if someone steals your Mac or you lose it.

How to Password Protect Folders on Mac

You can password-protect a folder on Mac through built-in and third-party tools. Using built-in tools on Mac is easy because they are compatible with native files and documents for password protection.

Also, they are usually more secure than third-party tools. Below, we’ve discussed both methods in detail.

A. Password-Protecting Mac Files With Built-In Tools (Using Terminal or Disk Utility)

Terminal and Disk Utility are the two built-in tools you can use to password-protect your files on Mac. You can use these tools to manage internal and external storage files, such as protecting important folders with passwords.

1. Using Terminal

The first method is to use the Terminal app on Mac. This complex method of password-protecting your folders requires a basic understanding of coding, which we will show in the steps below. Here are the steps to password-protect a folder on Mac using Terminal:

  1. Launch Finder and right-click the folder you want to lock folders. Select Get Info from the context menu.
Get info option on the folder

Note: You will see a window with the name of the folder you’ve selected. 

  1. Under the General section on your selected folder’s window, find the Where section and copy the folder’s location (path).
General Section of the selected folder
  1. Now, launch Spotlight Search and type Terminal.
  1. Press Enter to start the Terminal app.
Launching the Terminal app
  1. Type cd and hit the Spacebar.
Adding the code in the terminal app
  1. Paste the location path you copied from Where and press Enter.
Terminal Code
  1. Next, type the command in the Terminal window as zip -er “foldername”.zip “foldername.” Here, replace the “foldername part with the folder’s actual name. Make sure you remove the inverted commas and type the correct name as shown in the image:
Adding the folder name in the Terminal App
  1. You will have to enter the password twice in the Terminal’s window. Note that you cannot see your typed passwords in the window. Write the password and press Enter, then write it again to verify and press Enter.
Enter Password to secure the folder
  1. Once done, press the Enter key, and a prompt will appear asking you to give access to the Terminal app. Click Allow and wait. Your Zip folder will be ready with password protected disk image encryption.
Terminal App code
  1. Go to the Documents tab in the Finder to view the password-protected encrypted folder. If you try to open the folder, it will ask for a password.
Password protected folder in Document Tab

2. Using Disk Utility

Another way to protect your folders with passwords is by using Disk Utility. This method is comparatively more straightforward than the Terminal one as it doesn’t involve coding. Here is how to use Disk Utility to password-protect a folder on Mac:

  1. Launch Finder and find Applications > Utilities.
Disk Utility App
  1. Inside Utilities, Open Disk Utility.
Opening the Disk Utility App
  1. From the top-right corner of your desktop’s screen, choose File > New Image > Image from Folder.
Image from Folder option from File Section
  1. Select the folder you wish to add a password to and click Choose.
Choosing the folder to add Password Protection
  1. You can rename the folder in the Save As section. Also, you can change the file location from the Where section.
Saving the setting
  1. Select 128-bit AES encryption from the box next to Encryption. If you want extra protection, select 256-bit AES encryption, but it’s slower.
Choosing the Encryption type from Encryption options
  1. After selecting the encryption level, a pop-up will appear, asking you to enter your password. Enter your password twice and select Choose.
Enter the Password
  1. Click the Key symbol on the right side of the Password section to check your password’s safety. You will also see a Suggestion section giving you a password suggestion for your folder.
Password Assistant
  1. Choose Read/Write from the Image Format section.
Choosing Read/Write option in Image formate
  1. Next, select Save.
Save the settings
  1. Disk Utility will take a few moments to create a folder disk image. Once made, click Done to finish.
Successfully created disk image

You will see the disk image file in the DMG format placed right next to the folder/files you chose to password-protect.

All you need is to enter the password to load the DMG file. Once you’ve opened the file, you can delete the unencrypted file from your directory.

The security of your data is the most important thing for you. And you can increase your data security by adding a Fingerprint to your MacBook Pro to increase your security.

B. Password-Protecting Mac Files With Third-Party Tools

Encrypto is an encryption program you can download from the Mac App Store. It offers superior encryption and decryption services to password-protect your important files and documents. Here is how to encrypt with Encrypto:

  1. Download and install Encrypto from your Mac Apple Store.
  2. Find and launch the Encrypto application in the Finder > Applications
Encrypto Application
  1. Now, drag and drop the folder you want to encrypt in Encrypto’s interface.
  2. The application will ask you to enter the password. Type the password in the Password section and enter a hint in the Hint section. The hint is optional, so you can skip it.
Add Password option in Encrypto
  1. Next, click Encrypt to start encryption.
Start encryption
  1. Choose the Save As option to save the file after it’s encrypted.
Save As option to save the file
  1. Double-click to enter the password whenever you want to open the folder.
  2. Finally, select the Decrypt button to unlock the folder.
Decrypt button to unlock the folder

How to Password Protect Individual Files on Mac

The Disk Utility method only applies when password-protecting a folder, not a single file. However, there are other ways to password-protect single files using built-in macOS apps like Notes and Preview.

A. Password-Protecting Files Using Built-In Mac Tools

Here are the step-by-step guides to protect your documents and files using built-in Mac tools:

1. Using Preview

Preview is a built-in Mac tool for handling PDFs and other documents. Here’s how you can use it to lock your files:

  1. Launch the Preview app from the Finder > Applications.
Preview Application
  1. Open any PDF file you want to password-protect.
Opening a PDF file
  1. From the top menu, select File > Export.
Export option in the Top menu bar
  1. Click Permissions.
Permissions
  1. Check the Require Password To Open Document option in a new pop-up window. Once done, type a password and verify.
Require Password To Open Document Checkbox
  1. PDF locks require an owner password, too. For permissions for guests, check out the permissions section and check the ones you want to allow to guest users. Once done, create an owner password in the Owner Password section.
Owner Password Permissions in the Preview App
  1. Finally, click Apply to save the changes.
Saving the changes in the Preview App

Note: Preview only supports PDF format for password protection. You must convert non-PDF files into PDF format if you want to password-protect them using Preview.

2. Using Notes

Notes is another easy-to-use built-in utility on Mac. You can save several notes inside the Notes app. Here is how to password-protect your notes:

  1. Launch the Finder and navigate to Applications > Notes.
Notes Application
  1. Double-click to open the Notes app and select the note you want to protect.
Opening the Note for Password Protection
  1. Click File in the menu and select Lock Note from the menu.
Lock Note Option in the File drop-down menu
  1. Enter your password in the given field and click OK.
Enter Password to lock the Note file

You can also use the Number, Keynote, and Pages utilities on your Mac to add passwords to your important files.

All you need to do is open the document and click the File > Set Password option from the top menu bar. Enter and verify to set the password.

Just in case you forgot your password, then you can visit MacBookProSlow’s article on How to Find Saved Passwords.

B. Password-Protecting Files With Third-Party Tools

LibreOffice is one of the best open-source office suites for Mac and Windows. As a Mac user, you can use this tool to password-protect your documents so no one can access them. Here are the steps to protect your files using LibreOffice:

  1. Download and Install LibreOffice on your Mac.
  2. Launch the LibreOffice app from the Finder > Applications.
Launching the LibreOffice Application
  1. Click Open File to open a file you want to give a password to.
Open File option in LibreOffice
  1. Select a file and click Open.
Opening the file in LibreOffice
  1. Now, click the File option in the top menu bar and select Save.
Save option in the File drop-down manu
  1. In the Save window, checkmark Save with Password > Save.
Checkmark of Save with Password
  1. Enter and confirm your password and click OK.
Add File Encryption Password

How to Hide a Folder on Mac

Hiding folders on Mac is another way to ensure no one can see your confidential information. You can use Terminal to do so by following these steps:

  1. Open the Finder, select Applications from the left panel, and double-click Utilities.
Utilities app in Applications
  1. Double-click the Terminal app.
Launching the Terminal app
  1. Type the command: chflags hidden in the Terminal window.
chflags hidden Command in Terminal app
  1. Drag and drop the folder you want to hide into the Terminal window. As a result, your file’s path will be pasted into the Terminal.
  2. Finally, hit Enter to hide the file.
Drag down the folder to hide in Terminal window
  1. Launch the Terminal app and alter the chflags hidden to chflags unhidden if you want to unhide the hidden folder.

Conclusion

Password-protecting confidential folders and files safeguard your personal information. Mac users can use built-in tools like Disk Utility and Terminal to password-protect folders and files.

While Disk Utility provides standard password protect files, Terminal offers strong encryption, but it is for more advanced Mac users because it requires basic coding. 

Alternatively, you can use third-party applications like Encrypto and LibreOffice to password-protect your folders and individual files.

We hope this article was helpful and that you were able to encrypt your folders on your Mac. If you liked it, share it with your friends, and feel free to contact us if you have any queries!

About Devansh Kamdar
I'm an Apple fan who's been using an iMac and a MacBook Pro for work-related tasks since 2017. I also own an iPhone 13 and several other small Apple accessories. Although I'm preparing to build my own PC soon, I still spend most of the time on my Mac.

Leave a Reply

Your email address will not be published. Required fields are marked *