Although Windows 11 has an array of security features and drive encryption powered by BitLocker, there is no straightforward way to lock a folder on Microsoft's desktop OS. Adding an extra layer of security over private folders is important before sharing your Windows laptop or PC with someone else. Here are the effective ways to password-protect any folder on Windows 11.

You can always create a guest account on Windows 11. That said, it's not a feasible solution when you want to temporarily hand over your Windows device to someone. Instead, check out several ways to lock folders on Windows 11.

1. Use OneDrive Personal Vault to lock folders

Very handy for Microsoft 365 subscribers

Microsoft's cloud storage service offers Personal Vault to protect your files and passwords from unauthorized access. Personal Vault can store up to three files if you are on OneDrive free or a standalone 100GB plan. However, if you are a Microsoft 365 subscriber, you can use the feature without any restrictions.

  1. Press the Windows + E keys to launch File Explorer. Find OneDrive from the sidebar.
  2. Double-click on Personal Vault to unlock it.
    Private Vault in OneDrive
  3. Go through the usual instructions to set up your Vault. Microsoft sends a 2FA (two-factor authentication) code to your email account or phone number. Unlock your Personal Vault.
    Private Vault unlocked on Windows
  4. Move or copy your private files and folders to OneDrive's Personal Vault, and you will be good to go.

OneDrive locks your Personal Vault after 20 minutes of inactivity. You can also lock it instantly from the system tray. Click the OneDrive icon in the bottom right corner and select Lock Personal Vault.

lock private vault on Windows

The best part is that all your files and folders in Personal Vault get synced to OneDrive. This means you can access your essential files via OneDrive on mobile and other devices. Also, OneDrive storage shouldn't be a concern since an active Microsoft 365 plan comes with 1TB of cloud storage space.

From now on, you can head to Personal Vault in File Explorer, authenticate yourself with a device passcode or Windows Hello, and check your files and folders.

Windows Security menu to access Private Vault

2. Use 7-Zip to protect folders

Effective and free method to lock folders

7-Zip is a well-known tool to create zip files on Windows. You can also enable encryption protocol and protect your relevant folders with a password. Follow the steps below to make changes.

  1. Download 7-Zip from the official website.
  2. Once you install the app, open File Explorer and find a folder you want to protect with a password
  3. Right-click on a folder and select Show more options.
  4. Expand 7-Zip and select Add to Archive.
    add to archive in 7-Zip app on Windows
  5. Click the checkmark beside Delete files after compression. Set the Compression level to 0-Store. Enter the encryption password and hit OK.
    Z-Zip app options for encryption
  6. 7-zip creates a new folder with a .7z extension. You can open it with any archiving program and access your files by entering the password.

For instance, when we opened the folder using the WinRAR app Windows, it straightway showed the dialog box below to access personal files.

enter password to access folder files on Windows

Wise Folder Hider is another effective third-party app for hiding, encrypting, and locking personal documents and media files.

3. Use a virtual hard drive and BitLocker to create password protection

Ideal for Windows 11 Pro and Enterprise users

If you have Windows 11 Pro or higher, you can use BitLocker to protect your sensitive data. You'll need to create a virtual hard drive and then use BitLocker to protect it.

Creating a virtual hard disk (VHD)

First, we need to create a virtual hard disk (VHD) that will serve as your folder for the files you want to protect. Here's how to do it:

  1. Right-click the Start icon on your taskbar and select Disk Management.
  2. In the menu bar at the top, click Action, and then Create VHD.
    Screenshot of Disk Management in Windows 11 showing the option to create a virtual hard disk
  3. Click Browse and choose a location to store the VHD file in.
  4. Name the file and click Save.
  5. You can pick the initial drive size or enable Dynamically expanding to expand your drive as it gets bigger over time.
    Screenshot of the Create VHD dialog with the size options highlighted
  6. Click OK. Your new VHD will show up in Disk Management as Not Initialized.
  7. Right-click Disk X and choose Initialize Disk.
    Screenshot of Disk Management showing the option to initialize a disk
  8. Make sure the box for the disk is checked, and choose either the GPT or MBR partition style.
    Screenshot of the Initialize Disk dialog with Disk 1 selected and partition style set to GPT.
  9. Click OK.
  10. Check the unallocated space next to the disk you just created. Right-click this area and choose New Simple Volume.
    Screenshot of Disk Management showing the option to create a new simple volume on unallocated space
  11. Follow the on-screen instructions and assign a drive letter.
    Screenshot of the New Volume Wizard showing drive letter S assigned to the drive being created
  12. Use the Volume label field to name your drive and click Next.
    Screenshot of the New Volume Wizard showing a custom volume label

Using BitLocker to create a password

You'll now have a virtual hard drive that shows up in Windows, so the next step is to protect it with a password.

  1. Launch Control Panel and select System and Security.
    Screenshot of Windows 11 Control Panel with System and Security section highlighted
  2. Choose BitLocker Drive Encryption.
    Screenshot of the System and Security section of Control Panel with BitLocker drive encryption highlighted
  3. Find the drive you created under Fixed data drives and click Turn on BitLocker.
    Screenshot of BitLocker in the Control Panel with a fixed data drive highlighted
  4. Choose the Use a password to unlock the drive option and enter the password you want to use.
    Screenshot of BitLocker drive encryption setup asking the user to set a password
  5. Choose whether to save the backup recovery key. The Save to your Microsoft Account option is easiest if you have a linked account, but you can also use the Save to a file if you want to store the key somewhere else.
    BitLocker recovery  key backup-1Screenshot of BitLocker giving the user the option to save a backup recovery key
  6. Click Next.
  7. Choose Encrypt used disk space only and click Next.
    Screenshot of BitLocker set to only encrypt used disk space
  8. Choose Compatible mode and click Next.
    Screenshot of BitLocker encryption set to Compatible mode
  9. Click Start encryption, and once it's finished, click Close.

Accessing and locking the virtual hard disk

After creating and securing the virtual hard disk, you can access the password-protected drive. Here are the basics of using this folder.

  1. Find the VHD file you created and double-click it to mount the drive. You may see an error saying access is denied since the drive hasn't been unlocked yet.
    Screenshot of a virtual hard disk file in the Windows 11 File Explorer
  2. Once the drive is mounted, navigate to This PC and double-click the drive to open it. Enter the password, then move your files to the folder.
    Screenshot of Windows 11 File Explorer and BitLocker asking the user for a password to access a drive
  3. Right-click the drive and choose Eject.
    Screenshot of Windows 11 File Explorer showing the option to eject a virtual hard drive

Because this hard drive is a file, you can also store it on a flash drive or move it to another PC to access your private data anywhere while keeping it safe.

Keep prying eyes away

Among all the methods, we recommend going with BitLocker encryption if you have Windows 11 Pro, but if you have a Home edition of Windows 11, use OneDrive or a third-party app to get the job done. If you'd like to learn about other security features in Windows 11, check out how to use Smart App Control or how to disable Microsoft Defender.