How to password protect a folder on Windows 10

Windows 10 folder password
Windows 10 folder password (Image credit: Future)

Although Windows 10 doesn't have the option to protect folders and files with a password, it doesn't mean your data isn't secure. One of the reasons why you can't apply a password to a folder is that your account is already protected from unauthorized access with a password (and even encryption if you use BitLocker).

However, if you have priceless pictures, bank information, and other business documents you feel would be more secure using a password, you can use a combination of a virtual hard disk and BitLocker to password-protect folders and files. And you can do this without third-party tools or complicated scripts, which are probably not as secure as using the Windows 10 built-in encryption feature.

In this how-to guide, we'll walk you through the steps to protect a folder with a password using a virtual hard disk and BitLocker available with the professional version of Windows 10.

How to protect a folder with password on Windows 10

Windows 10 doesn't include an option to add a password to a folder, but you can set up a virtual hard drive with BitLocker, enabling you to mimic the same password protection experience and extra security.

Create virtual hard disk

To create a virtual hard disk on Windows 10, use these steps:

  1. Open Start.
  2. Search for Disk Management and click the top result to open the app.
  3. Click the Action menu.
  4. Click the Create VHD option.

(Image credit: Future)
  1. Click the Browse button to select a location to store the virtual disk.
  2. Specify a name for the drive – for example, folder_vault.

(Image credit: Future)
  1. Click the Save button.
  2. Under the "Virtual hard disk size" section, specify the space to reserve for storage. For example, 8GB, but you can use any amount based on the content you want to protect.
  3. (Optional) Under the "Virtual hard disk format" section, select the VHDX option.
  4. Select the Dynamically expanding option so the storage will grow as you save files.

(Image credit: Future)
  1. Click the OK button.
  2. Right-click the "Disk x," and select the Initialize Disk option.

(Image credit: Future)
  1. Check the new Disk x.
  2. Select the "MBR (Master Boot Record)" option.

(Image credit: Future)
  1. Click the OK button.
  2. Right-click the "Unallocated space" and select the "New Simple Volume" option.

(Image credit: Future)
  1. Click the Next button.
  2. Use the default settings for the volume size.

(Image credit: Future)
  1. Click the Next button.
  2. Use the "Assign the following drive letter" drop-down menu to select a letter for the new drive.

(Image credit: Future)
  1. Click the Next button.
  2. Use the "File system" drop-down menu, and select the NTFS option.
  3. Use the "Allocation unit size" drop-down menu, and select the Default option.
  4. In the "Value label" field, type a descriptive name for the drive—for example, folder_vault.
  5. Check the "Perform a quick format" option.

(Image credit: Future)
  1. Unless necessary, clear the "Enable file and folder compression" option.
  2. Click the Next button.
  3. Click the Finish button.

Once you complete the steps, you'll end up with a virtual hard disk that you can treat as a folder and password protect using BitLocker.

Enable BitLocker on virtual hard disk

To set up BitLocker on a virtual hard disk on Windows 10, use these steps:

  1. Open Control Panel.
  2. Click on System and Security.
  3. Click on BitLocker Drive Encryption.
  4. Under the "Fixed data drives" section, select the folder_vault drive.
  5. Click the "Turn on BitLocker" option. 

(Image credit: Future)
  1. Check the "Use a password to unlock the drive" option.

(Image credit: Future)
  1. Create a password to protect your folders inside the drive.
  2. Click the Next button.
  3. Click the "Save to a file" button.

(Image credit: Future)
  1. Select a location to store the recovery key.
  • Quick tip: If you forget the password or lose the recovery key, you won't be able to recover your files, so make sure to keep this file in a secure place. You can also use the option to save the password on your Microsoft account.
  1. Click the Save button.
  2. Click the Next button.
  3. Select the "Encrypt used disk space only" option.

(Image credit: Future)
  1. Click the Next button.
  2. Select the Compatibility mode option.

(Image credit: Future)
  1. Click the Next button.
  2. Click the Start encryption button.
  3. Click the Close button.

After you complete the steps, you can begin using the virtual disk as a folder to protect your content with a password.

Lock and unlock folder

Once you created a virtual drive and configured BitLocker, you'll need to know a few steps to lock and unlock your files and folders.

Unlock folders with password

To access folders and files protected with a password on Windows 10, use these steps:

  1. Open File Explorer.
  2. Browse to the folder with the folder_vault.vhd file.

(Image credit: Future)
  1. Double-click the VHD (VHDX) file to mount it to File Explorer.
  • Quick note: If you receive a "is not accessible" and "Access is denied" message, this is normal behavior because you mounted the drive, but you haven't unlocked it with the password yet.
  1. Click on This PC from the left pane.
  2. Under the "Devices and drives" section, double-click the drive to open the sign-in page.

(Image credit: Future)
  1. Type the password to unlock the drive with your important files and folders.
  • Quick tip: If you can't remember the password, click the "More options" option, click the "Enter recovery key" option, and type the 48-digit recovery key available in the text file that you should have saved when setting up BitLocker on the virtual hard disk.

(Image credit: Future)
  1. Click the Unlock button.

Once you complete the steps, you will be able to access your important files and folders.

Lock folders with password

To lock the folder again on Windows 10, use these steps:

  1. Open File Explorer.
  2. Click on This PC from the left pane.
  3. Under the "Devices and drives" section, right-click the BitLocker drive, and select the Eject option.

(Image credit: Future)

After you complete the steps, the folders will remain encrypted and protected. The next time you access your files and folders, you'll need to follow the unlock instructions, which include entering the password again.

The best part about using a virtual hard drive with BitLocker to add a password to a folder is that you can continue to unlock your files on the same or different computer using the above steps.

More resources

For more helpful articles, coverage, and answers to common questions about Windows 10 and Windows 11, visit the following resources:

Mauro Huculak

Mauro Huculak is technical writer for WindowsCentral.com. His primary focus is to write comprehensive how-tos to help users get the most out of Windows 10 and its many related technologies. He has an IT background with professional certifications from Microsoft, Cisco, and CompTIA, and he's a recognized member of the Microsoft MVP community.