How to Password Protect a Folder

Secure your information from prying eyes

Digital illustration of folder and lock icons

D3Damon / Getty Images

There are several security measures that you can put in place to protect the important files and information stored on your Mac or PC. The most common is to lock your computer whenever you’re not using it, requiring a password to bypass the login screen.

You can even take this safekeeping a step further by password-protecting individual folders, which can come in especially handy when you’re using a shared laptop or desktop. Taking the following steps will help ensure that access to your sensitive files will require a password each and every time.

How to Password Protect a Folder in Windows  

There are several ways to protect a file folder with a password in Windows. Unfortunately, the most effective method, and therefore the one that we suggest, involves utilizing a third-party application.

Use a File Archival Program

The program we're recommending is 7-Zip, a free and open source file archival utility which also allows you to protect folders with a password.

Follow along with these steps to password-protect your important folders with 7-Zip:

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

  2. Find the folder that you want to have a password, right-click it, and go to 7-Zip > Add to archive.

  3. Enter a password in the Encryption text boxes, and 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 for where the archive should be saved, and the compression level (set it to Store to use no compression).

  4. Test the password-protected folder by trying to open it in Windows Explorer. You should be presented with a password prompt.

    Archive file password prompt

Going forward, anyone attempting to view the files within the archive, as well as anyone attempting to extract the archived files, will be prompted 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.

Use the Folder Encryption Feature in Windows

If using an outside 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.

  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 will now be encrypted and will only be accessible by your account. Be forewarned, however, that someone logged in to your Windows account will be able to access this folder without a password.

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. 

  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, and 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. In both text boxes, type the password the folder should have, and 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 folder for where it should be saved.

  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 will be 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 that 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 them isn't altered or rearranged in any way. This level of protection requires a user to enter a password to gain access to these files.

When these same files are encrypted, however, the data associated with them is essentially scrambled in a way that prying eyes would have an extremely tough time deciphering it in any way. 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 were to gain access to these files in their encrypted form and they didn't know the encryption key or passcode, the contents would be unreadable and virtually useless to them.