Windows 11 has no built-in way to put a password on a folder. On Pro, Enterprise and Education you can encrypt it with EFS, which unlocks with your Windows sign-in, or keep it on a BitLocker virtual drive that asks for a password. On any edition, use an AES-256 archive made with 7-Zip, or an encrypted vault app.
Right-click a folder in Windows 11 and you will not find a "Set password" option. Windows does not have one, on any edition. What it does have are encryption tools that each work a little differently, and some of them only exist on Windows 11 Pro.
So first, check your edition: open Settings > System > About and look at Edition under Windows specifications. Then pick from the list below.
- Pro, Enterprise or Education: EFS, or a BitLocker virtual drive with a password.
- Any edition, Home included: a password-protected archive, OneDrive Personal Vault, or Private Files, the Windows version of FileLock.
First, what does not work
The Hidden attribute. Right-click a folder, choose Properties and tick Hidden, and File Explorer stops listing it. But anyone can open View > Show > Hidden items and it is back. Nothing is locked.
"Folder locker" scripts. A popular trick is a small batch file that hides a folder and asks for a password. The password is written in plain text inside the script, so anyone can read it by opening the file in Notepad, and the folder itself is never encrypted. Skip it.
Method 1: Encrypt the folder with EFS (Pro and up)
EFS, the Encrypting File System, is built into Windows 11 Pro, Enterprise and Education. Microsoft says it is not available on Windows Home.
- Right-click the folder and choose Properties.
- On the General tab, click Advanced...
- Tick Encrypt contents to secure data and click OK.
- Click Apply, choose Apply changes to this folder, subfolders and files, then click OK twice.
- If Windows offers to back up your file encryption key, do it, and keep the backup on a USB drive.
Understand what this protects before you rely on it. EFS ties the files to your Windows account, so there is no password prompt: they open normally for anyone using your signed-in PC. What it stops is other user accounts on the same PC, and anyone who pulls out the drive and reads it elsewhere. If you lose the key, for example by reinstalling Windows without that backup, you are locked out of your own files. And a copy you email or upload is an ordinary, unencrypted file.
Method 2: A BitLocker virtual drive with a password (Pro and up)
This is the closest Windows gets to a folder that asks for a password. You create a virtual hard disk, a single file that Windows mounts as a drive, and lock it with BitLocker.
- Open Settings > System > Storage > Advanced storage settings > Disks & volumes and click Create VHD.
- Give it a name, a location and a size, choose VHDX and Dynamically expanding, then follow the prompts to initialise it and format it as NTFS with a drive letter.
- Open Control Panel > System and Security > BitLocker Drive Encryption, find the new drive under Fixed data drives and click Turn on BitLocker.
- Choose Use a password to unlock the drive, set a strong password, save the recovery key somewhere other than this PC, and let it encrypt.
- Move your private folder onto the new drive.
To lock it, right-click the drive in File Explorer and choose Eject. To open it again, double-click the .vhdx file, then open the drive and type the password.
It is strong, but it takes setup, the drive has a size you have to pick in advance, and turning on BitLocker needs Pro. Windows Home has Device encryption instead (Settings > Privacy & security > Device encryption) on supported PCs. It protects the whole drive if your laptop is stolen, but asks for nothing extra once you are signed in, so it does not lock a single folder.
Method 3: A password-protected archive (any edition)
File Explorer's Compressed (zipped) folder has no password option, and Microsoft's own help page points to tools such as 7-Zip for encrypted archives. With 7-Zip, which is free:
- Right-click the folder and choose 7-Zip > Add to archive... On Windows 11 you may find 7-Zip under Show more options.
- Set Archive format to 7z, or zip if someone else has to open it.
- Under Encryption, type the password twice and set Encryption method to AES-256.
- For a 7z archive, tick Encrypt file names too.
- Click OK. Check that the archive opens with the password, then delete the original folder and empty the Recycle Bin.
The catch is that an archive is a sealed copy, not a lock you can open and close. To work on the files you extract them, and those extracted copies sit unprotected until you delete them again. A ZIP also shows its file names to anyone, and the older ZipCrypto method is weak, so always pick AES-256. Microsoft says File Explorer in Windows 11 version 24H2 does not handle encrypted archives, so whoever opens it needs an archiver as well.
Method 4: OneDrive Personal Vault
If your files are already in OneDrive, its Personal Vault is a locked area that needs a second check, such as a fingerprint, face, PIN or a code sent to you, and locks again after a period of inactivity. Without a Microsoft 365 Personal or Family subscription it holds only three files, and everything in it is stored in the cloud. That suits a few important documents you want on every device, not files you would rather keep off the internet.
Method 5: Private Files, the Windows version of FileLock
If you want a whole folder behind a passcode on any edition, without containers or archives, use Private Files, the Windows version of FileLock. It runs on Windows 11 and Windows 10 (version 2004 or later), Home included.
- Encrypted on your PC. Private Files encrypts its vault with AES-256 on the PC. Files you import are stored encrypted, not just hidden.
- One passcode. The app opens with your passcode and locks again when you leave it.
- No account, no cloud. Nothing is uploaded. The vault stays on this computer.
- Use files without unpacking them. View photos and videos, read PDFs and run PDF and image tools inside the vault, all on the PC.

To move a folder in:
- Install Private Files from the Microsoft Store, where it is listed as Private Files & Browser, and set a passcode.
- In Files, click Add > Import a Folder and choose your folder.
- Open a few files inside Private Files to check that everything came across.
- Delete the original folder and empty the Recycle Bin. Importing makes an encrypted copy, and the original stays readable on disk until you delete it.

Be clear about the limits. Private Files is only as strong as your passcode, and while it is unlocked, anyone at your keyboard can see what is inside, so let it lock when you step away. Files you export become ordinary files again. Private Files is free to use with a daily allowance on imports and tools, and Private Files PRO removes the limits. Unlike the phone apps, Private Files offers a recovery key for a forgotten passcode, so keep that key somewhere safe away from the PC.
Which one should you use?
On Windows 11 Pro, EFS is fine for keeping other accounts out, and a BitLocker virtual drive is the built-in way to get a real password prompt. To send files to someone, use an AES-256 archive. For a folder you open often, with a passcode, on any edition, use Private Files.
Keeping the same files on your phone? See how to hide files on Android or how to lock a folder on iPhone.
Frequently asked questions
Can I password protect a folder in Windows 11 Home?
Not with anything built in. EFS and BitLocker are not available on Home, so use a password-protected archive or an app that encrypts its own vault, such as Private Files.
Does EFS ask for a password when I open the folder?
No. EFS opens automatically for the Windows account that encrypted the files. It keeps other accounts and anyone who removes the drive out, but not someone using your signed-in PC.
Is making a folder hidden safe?
No. The Hidden attribute only stops File Explorer from listing the folder. Anyone can turn on View > Show > Hidden items and open it.
What if I forget the password of an encrypted 7z or ZIP file?
The files are lost. AES-256 has no reset, and the archiver cannot recover the password for you.
Does Private Files upload my files?
No. There is no account and no cloud. The vault stays on your PC, encrypted with AES-256.