How to Password Protect a Folder

Secure your information from prying eyes

Digital file folder illustration

D3Damon / Getty Images

If you have important files on your Mac or PC you want to keep from prying eyes, there are several security measures you can put in place to protect the information. The most common is to lock your computer whenever you’re not using it, so a password is required to bypass the login screen. You can take this safekeeping a step further by password-protecting individual folders, which comes in especially handy when you’re using a shared laptop or desktop.

If you need help remembering passwords, consider using a password manager. There are currently a lot of password managers available online.

How to Password Protect a Folder in Windows 

Since most versions of Windows can't password-protect files, you'll need to use a third-party application. We recommend 7-Zip, a free and open-source file archival utility that also allows you to protect folders with a password.

Here are the steps you need to take to password protect your important folders with 7-Zip:

  1. Download 7-Zip and install it on your computer.

  2. Find the folder you want to password protect, right-click it, then choose 7-Zip > Add to archive.

    You can use 7-Zip to archive and password protect folders on your Windows PC
  3. Enter your password under the Encryption section, then select OK.

    You can also modify other attributes and settings for the compressed folder while you're here, including the archive format itself (it's 7Z by default), the location where the archive is saved, and the compression level (set it to Store to use no compression).

    You can set a password for your archived folders using 7-ZIp
  4. Test the password-protected folder by trying to open it in Windows Explorer. You should see a password prompt.

    Archive file password prompt

Going forward, anyone attempting to view or extract the files within the archive needs to enter a password.

You should also delete the original folder in Windows Explorer. At this point, only the newly-created archive file is protected by a password, so if you leave the original folder on your computer, it essentially defeats the purpose of following the steps above.

How to Password Protect Using Windows' Built-In Encryption

If using a third-party application isn't your thing, there might be an alternative available depending on which version of Windows you're running. If you have Windows 10 Professional Edition, for example, there's an integrated encryption feature called Encrypted File System (EFS) that can help add some level of security to your most sensitive folders. 

Take the following steps to determine whether or not you have access to this feature:

  1. Right-click the folder you want to encrypt.

  2. Select Properties.

  3. Choose the Advanced button.

    You can access a folder's properties by right-clicking and selecting Properties
  4. Look in the Compress or Encrypt attributes section for an option labeled Encrypt contents to secure data. If you can, place a checkmark next to it.

    Advanced folder attributes in Windows 10
  5. Select OK and choose the desired settings when prompted.

Your folder and its contents are now encrypted and only accessible by your account. Someone logged in to your Windows account can still access this folder without a password, though, so it's not a perfect solution.

Password Protect a Folder in macOS

Mac users can password protect individual folders without the need for third-party software, thanks to the operating system's Disk Utility app. Here's how to do it:

  1. Open Disk Utility. The easiest way is through Finder, via Applications > Utilities.

  2. Go to File > New Image > Image from Folder.

  3. Locate and select the folder you want to protect with a password, then select Choose.

    Disk Utility displaying folders
  4. Change the Encryption type to 128-bit AES encryption (recommended) or 256-bit AES encryption (more secure, but slower).

  5. Enter your password in both boxes, then select Choose.

    Password prompt in Disk Utility
  6. Next to Image Format, select read/write from the drop-down menu.

    Also on this screen, you can optionally give the DMG file a custom name and choose a different location to save it.

  7. Select Save.

  8. Wait while the password-protected folder is being created. You'll know it's finished when you see the Operation successful message. Select Done to close the prompt. You can also exit Disk Utility.

When accessing your newly-protected folder, a disk image containing its files is created after your password is successfully entered — typically located alongside the protected archive itself. Once you're done accessing the folder's contents, it's important you delete this disk image by dragging it to the trash. If not, you leave its contents exposed without any password protection.

Encryption vs. Password-Protected Files and Folders

Now that you know how to protect your individual folders and files, it's important to know the difference between encryption and password protection.

When a folder or set of files is protected by a password, the data within isn't altered or rearranged in any way. This level of protection requires a user to enter a password to gain access to the files.

When the same files are encrypted, the associated data is essentially scrambled in a way that prying eyes would have an extremely tough time deciphering. In order to arrange the data back to its unencrypted form, you typically have to enter a passcode or password. The main difference here is that if someone gains access to these files in their encrypted form and they don't know the encryption key or passcode, the contents are unreadable and virtually useless to them.