How to Password Protect a Folder in Windows 10

Last updated on November 9th, 2026 at 02:11 pm

Windows 10 doesn’t have a setting that puts a password on a folder. The safest way is to put the folder in an encrypted archive with a free tool like 7-Zip, or in a BitLocker-encrypted virtual drive. Windows also has built-in file encryption (EFS), which locks files to your user account rather than to a separate password.

Applies to: Windows 10. BitLocker and EFS need Windows 10 Pro, Enterprise, or Education.

Which method should you use?

  • Share the folder or store it on a USB drive: use an encrypted ZIP or 7z archive.
  • Keep a private folder on your PC that you open often: use a BitLocker virtual drive.
  • Stop other people who use the same PC from opening your files: use EFS encryption, or give each person their own account.

Method 1: Put the folder in an encrypted archive

7-Zip is a free, open-source file archiver. It encrypts archives with AES-256.

  1. Install 7-Zip from its official website.
  2. Right-click the folder and select 7-Zip > Add to archive.
  3. Set Archive format to 7z (or zip), and choose AES-256 under Encryption.
  4. Type a strong password twice. For 7z, check Encrypt file names so people can’t even see what’s inside.
7-Zip Add to Archive window with the password fields and AES-256 encryption method highlighted
Enter a password (1) and choose AES-256 (2).
  1. Select OK. Check that the archive opens with your password, then delete the original folder.

Anyone who opens the archive must enter the password. If you forget it, the files can’t be recovered.

Opening the archive later

Double-click the archive in 7-Zip, or right-click it and select 7-Zip > Open archive, then enter the password. Windows 10’s built-in ZIP support can’t create password-protected ZIP files, and it can’t open ZIP files that use AES-256, so anyone you share the archive with will need 7-Zip or a similar app too.

If you edit a file inside the archive, 7-Zip asks whether to update the archive when you close the file; select OK so your changes are saved.

Can I password protect a single file instead?

Yes. Put it in an encrypted archive, or, for Office files, set a password in the app. Excel, for example, lets you require a password to open an Excel file.

Method 2: Use a BitLocker-encrypted virtual drive

This creates a private drive that needs a password to unlock. It works well for a folder you use every day.

  1. Right-click Start and select Disk Management.
  2. Select Action > Create VHD. Choose a location, a size, and VHDX, then select OK.
  3. Right-click the new disk on the left, select Initialize Disk, and select OK.
  4. Right-click the unallocated space, select New Simple Volume, and follow the steps to give it a drive letter.
  5. In File Explorer, right-click the new drive and select Turn on BitLocker. Choose Use a password to unlock the drive, save your recovery key, and finish the wizard.

Move your private files into this drive. When you restart or eject it, it locks again. To open it, double-click the VHDX file and enter the password. To lock it again without restarting, right-click the drive in File Explorer and select Eject.

When you create the VHD, pick a size a bit larger than the files you plan to keep, because the drive can’t hold more than that. Choose Dynamically expanding so the file only takes up as much disk space as you actually fill.

Method 3: Encrypt the folder with EFS

  1. Right-click the folder and select Properties.
  2. On the General tab, select Advanced.
  3. Check Encrypt contents to secure data, then select OK > Apply.
Windows 10 Advanced Attributes dialog with Encrypt contents to secure data checked and OK highlighted
Check Encrypt contents to secure data (1), then select OK (2).
  1. Choose Apply changes to this folder, subfolders and files and select OK.
  2. When Windows asks, back up your encryption key to a USB drive.

EFS doesn’t ask for a password when you open the folder. Your files open normally for you but can’t be opened by other accounts on the PC. Protect your Windows account with a strong password or PIN.

Check and back up EFS encryption

  • See what’s encrypted: encrypted files and folders show a small padlock on their icons in File Explorer.
  • Back up your key later: if you skipped the prompt, select Start, type Manage file encryption certificates, open it, and follow the steps to back up your certificate to a USB drive. Without it, a Windows reinstall or a lost account means the files can’t be opened.
  • Turn it off: go back to Advanced and clear Encrypt contents to secure data.

Can someone open my folder on another PC?

With an encrypted ZIP or a BitLocker drive, no, not without the password. EFS works differently: it ties the files to your Windows account, so copying them to a USB drive formatted as FAT32 or exFAT, or emailing them, can remove the encryption.

EFS is also covered on Microsoft’s How to encrypt a file or folder page.

You can also password protect a ZIP file in Windows 10, or on a newer PC, password protect a text file in Windows 11.

Why not use a “folder lock” script?

You may find instructions for a batch file that “locks” a folder. It only hides the folder and renames it. Anyone who knows the trick, or who shows hidden files, can open it, and the password sits in plain text inside the script. Use one of the methods above instead.

If you just want to hide a folder

Hiding a folder keeps it out of sight but doesn’t protect it. If that’s all you need, you can hide files and folders in Windows 10.