How to lock a folder on Mac to keep your files private

With so many privacy threats around, having an extra layer of protection on your Mac is crucial. Luckily, you can keep your private data far from prying eyes by putting it in a password-locked folder. 

Let’s see how to password protect a folder on Mac so that no person or app could crack it.

Why you might want to protect a folder with a password

You wouldn’t show your credit card statements in public. So why not protect financial or health information on your computer? If you share your Mac with someone else, password protection will cover up files that you don’t want anyone to see. That also keeps your private data private if you lose your device.

Even if you’re the only user of your Mac, locking and encrypting your sensitive files is a must these days. Did you know that some data-mining apps could spy on your documents and folders? As cybercriminals adopt new tactics and code innovations, there’s no telling if your computer is hacked, until your bank account turns out to be empty.

How you can keep your files safe

To be on the safe side, savvy Mac users regularly check their computers with anti-malware software. My personal favorite is CleanMyMac X, as Apple notarized it on macOS Catalina. It comes with a Malware Removal tool that deals with Mac-specific viruses. Here is how it works:

  1. Launch the app (get a free version here).
  2. Choose the Malware Removal tab in the sidebar.
  3. Click Scan.
  4. If CleanMyMac X detects a threat, press Remove to get rid of it. If it doesn’t, congratulations! You have no malware on your Mac.
How you can keep your files safe

How to password lock a folder on Mac

With Disk Utility, which is available on every Mac, you can encrypt and password protect a folder by turning it into a disk image (DMG). Follow the steps below:

  1. Open Finder > Applications > Utilities > Disk Utility. 

    Disk Utility
  2. Go to the File menu > New Image > Image from Folder.

    File menu

  3. Select a folder you want to password protect in the dialog box that appears, then click Choose. 

    Select a folder you want to password protect
  4. Enter a filename for the disk image and select where to save it.

    Enter a filename for the disk image

  5. Pick a preferred encryption option from the dropdown menu: 128-bit AES encryption (recommended) or 256-bit AES encryption (more secure, but slower).



  6. Enter and verify your password in a new dialog box. Tap the key icon to open Password Assistant and check how secure your password is. Once you’re done with a password, click Choose. 

    Enter and verify your password

  7. Tip:

    There is no way to recover the password to password-protected DMG file, so choose the one you won’t forget or write it down in a safe place.

  8. Click the Image Format menu and pick ‘read/write’.



  9. Click Save, then click Done. Now your folder is password-protected.
Image Format menu

Note that the original folder is still on your Mac. Make sure you have no issues accessing the DMG file, then trash the original folder so that no one gets access to it.

How to lock a folder on Mac without Disk Utility? You can do that with Terminal or third-party apps with similar functionality. Still, I opt for Disk Utility, as this method is relatively fast.

Tip

CleanMyMac X’s Privacy tool gathers all your Mac’s private data in one place. With its help, you can clean up your online and offline history, including chat transcripts, browsing traces, Recent Items lists, and even old Wi-Fi networks.


How to use a password-protected folder

Go to the location where you saved the disk image and double-click to open and mount it to your Mac. Enter the password when prompted and press OK. You can optionally check the box to save the password in your keychain. 

Once you enter the password, the DMG file mounts in two places: on your desktop and in the Finder sidebar. Click either one of these to open the folder. 

To password protect it again, click the eject icon in the Finder sidebar. That’s it! 

Hope this step-by-step guide will help you keep your sensitive files safe and private.

CleanMyMac X CleanMyMac X
CleanMyMac X

Your Mac. As good as new.