Windows 10 and Windows 11 do not have a built-in “password-protect this folder” option, but there are three reliable ways to do it. Method 1 is a free batch-file trick that hides a folder behind a password. Method 2 uses Wise Folder Hider, a free app with double-password protection. Method 3 uses 7-Zip to create an AES-256 encrypted archive — the only one of these that provides real cryptographic protection. Pick based on how sensitive your files are.
Applies to: Windows 10 (22H2) and Windows 11 (23H2, 24H2, 25H2) | Last updated: April 13, 2026
Key Takeaways
- Windows has no native “password protect folder” feature — you either hide the folder (Methods 1 and 2) or encrypt it (Method 3).
- The batch file method hides, it does not encrypt. Anyone who opens the
.batfile in Notepad can read the password. Use it for casual privacy only. - Wise Folder Hider is a free app with a master password plus per-folder passwords. It is more convenient than the batch file but still not true encryption.
- 7-Zip with AES-256 is the only method here that gives you real encryption. If the files are sensitive (tax documents, IDs, work contracts), use this one.
- For a full-drive solution, use BitLocker (Windows 11 Pro) or Device Encryption (Windows 11 Home) to encrypt the entire system drive.
In This Guide
Three methods, ordered from least to most secure:
- Method 1: Batch File (No Software) — Fastest. Good enough to keep a casual snooper out. Not real encryption.
- Method 2: Wise Folder Hider (Free) — Friendly interface, master password, per-folder passwords. Still hiding, not encrypting.
- Method 3: 7-Zip AES-256 Encrypted Archive — Actual encryption. The right choice for sensitive files. (Recommended)
Quick Steps
- Casual use: create a
PasswordProtect.batfile with the script below, replaceENTER_YOUR_PASSWORDwith your chosen password, run the file once to create a “Locker” folder, and run it again to lock. - Friendly UI: install Wise Folder Hider, set a master password, drag the folder into the app, and optionally set a second password on the folder.
- Real encryption: install 7-Zip, right-click your folder > 7-Zip > Add to archive, set Archive format to 7z, enter a password, tick Encrypt file names, set Encryption method to AES-256, and click OK.
Method 1: Password-Protect a Folder With a Batch File (No Software)
This method creates a small script that renames a folder using a hidden system attribute so it disappears from File Explorer until you enter the correct password. It takes about two minutes to set up and requires nothing beyond Notepad.
Honest security warning: this is obfuscation, not encryption. Anyone who right-clicks the
.batfile and chooses Edit can read your password in plain text. It keeps a curious family member out of your holiday photos — it will not stop anyone who knows what they are doing.
Step 1: Create the Folder and Script
- Create a folder anywhere on your PC (e.g.
C:\Users\YourName\Desktop\Personal Files). - Inside that folder, right-click empty space > New > Text Document.
- Open the text file and paste the script below.
cls
@ECHO OFF
title Folder Locker
if EXIST "Locker.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
if NOT EXIST Locker goto MDLOCKER
:CONFIRM
echo Are you sure you want to Lock the folder(Y/N)
set/p "cho=>"
if %cho%==Y goto LOCK
if %cho%==y goto LOCK
if %cho%==n goto END
if %cho%==N goto END
echo Invalid choice.
goto CONFIRM
:LOCK
ren Locker "Locker.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
attrib +h +s "Locker.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
echo Folder locked
goto End
:UNLOCK
echo Enter password to Unlock folder
set/p "pass=>"
if NOT %pass%== ENTER_YOUR_PASSWORD goto FAIL
attrib -h -s "Locker.{21EC2020-3AEA-1069-A2DD-08002B30309D}"
ren "Locker.{21EC2020-3AEA-1069-A2DD-08002B30309D}" Locker
echo Folder Unlocked successfully
goto End
:FAIL
echo Invalid password
goto end
:MDLOCKER
md Locker
echo Locker created successfully
goto End
:End

Step 2: Set Your Password
Find the line that reads if NOT %pass%== ENTER_YOUR_PASSWORD goto FAIL and replace ENTER_YOUR_PASSWORD with the password you want to use. Keep it short and use no spaces (batch syntax treats spaces as separators).
Step 3: Save as a .bat File
- Click File > Save As.
- In the Save as type dropdown, pick All Files.
- Name the file
PasswordProtect.bat— the.batextension is required, otherwise it saves as a normal text file. - Click Save and close Notepad.
Step 4: Use the Script
- Double-click
PasswordProtect.bat. A folder called Locker appears next to it. - Move the files you want to protect into the Locker folder.
- Double-click
PasswordProtect.batagain. A black window asks “Are you sure you want to Lock the folder (Y/N)”. Press Y and Enter. The Locker folder disappears from File Explorer. - To unlock, run the batch file again, type your password, and press Enter. The folder reappears.

Tip: This method works on external drives too (USB sticks, external SSDs). Keep the
.batfile and the Locker folder in the same directory on the drive.
Method 2: Password-Protect Folders With Wise Folder Hider
Wise Folder Hider is a free Windows utility that hides folders behind a master password and lets you add a second password per folder for another layer. The interface is much friendlier than editing a batch file, and it survives moving files between drives.
- Download it from the Wise Folder Hider site. Pick the free version.
- Run the installer. Keep the default options, accept the licence, and launch the app.
- Set a master password on first launch. Use something long — you cannot recover it without the paid version.
- To hide a folder, drag it into the Wise Folder Hider window (or click Hide Folder and browse to it). The folder disappears from File Explorer.
- To add per-folder protection, click the dropdown arrow next to a hidden folder in the list and choose Set Password. Set a different password for it.
- To access a hidden folder, open Wise Folder Hider, enter the master password, click Open next to the folder, and enter its per-folder password if you set one.

Warning: if you forget the master password, the free version has no recovery option. Password reset is a paid upgrade. Store the master password in a password manager before you hide anything important.
Method 3: Real Encryption With 7-Zip (AES-256)
If you are protecting anything sensitive — financial records, IDs, contracts, private photos — the first two methods are not good enough. They hide your files from people who do not know where to look, but the files themselves are still readable by anyone who boots from a USB or plugs your drive into another PC.
7-Zip with AES-256 encryption is different — the file contents are genuinely scrambled until the correct password is entered. Even if someone steals the drive, they cannot read the archive. See my file compression guide if you need WinRAR instead; it supports the same AES-256 encryption.
- Download 7-Zip from 7-zip.org and install it. It is free and open-source.
- Right-click the folder you want to protect and choose 7-Zip > Add to archive (in Windows 11, you may need to click Show more options first).
- In the Add to Archive window, change Archive format to
7z. - Under Encryption, enter and re-enter your password.
- Set Encryption method to AES-256.
- Tick Encrypt file names — without this, someone can still see the names of the files inside the archive.
- Click OK. 7-Zip creates a
.7zfile. Once you confirm it opens with the password, securely delete the original unencrypted folder (Shift + Delete, then empty Recycle Bin, or use a tool like Eraser for true overwrite).
To access the files, double-click the .7z file, enter the password, and 7-Zip will let you extract or open individual files. Always extract to a temporary folder, use the files, then re-archive and delete the extracted copies when you are done.
What About BitLocker?
BitLocker encrypts entire drives rather than individual folders and is worth using alongside (not instead of) the methods above. On a laptop that might get stolen, turning on BitLocker for the system drive means that even if someone removes the SSD and mounts it in another PC, they get an encrypted blob. It is included with Windows 11 Pro; Windows 11 Home has a lighter version called Device Encryption that auto-enables on compatible hardware when you sign in with a Microsoft account.
BitLocker will not help you hide a folder from another user on the same PC — both users will see the same unlocked drive once Windows boots. For per-folder protection within a shared machine, stick with the three methods above.
Frequently Asked Questions
How secure is the batch file method?
Basic. It hides the folder using a hidden system attribute and keeps the password in plain text inside the .bat file. Anyone who right-clicks the file and opens it in Notepad sees the password instantly. Use it for mild privacy (hiding gift lists from housemates) but not for anything valuable.
Can I recover a forgotten master password in Wise Folder Hider?
Only with the paid Pro version. The free version has no recovery path — if you lose the master password, reinstalling the app will not help, because the hidden files are still marked hidden by the original installation. Save the master password in a password manager like Bitwarden or 1Password before you hide anything.
Does the batch file method work on external drives?
Yes. Keep the PasswordProtect.bat file and its Locker folder together on the same USB stick or external drive. Note that any other Windows PC can still run the batch file — the “protection” travels with the drive, not with a specific user account.
Which method should I use for truly private files?
Method 3 (7-Zip AES-256). It is the only one on this list that actually encrypts the contents. For documents like tax returns, copies of passports, or work contracts, do not rely on the batch file or a folder-hider app — use a proper encrypted archive.
Is there a way to password-protect a folder natively in Windows 11?
Not really. Windows 11 has EFS (Encrypting File System) on Pro editions, which ties file access to your Windows user account, but that is not the same as a password prompt. For a native password-protected folder experience, you need a third-party tool — the three methods in this guide cover the full range from casual to properly secure.
Can I password-protect multiple folders at once with Wise Folder Hider?
Yes. You can hide as many folders as you like under a single master password, and set an optional secondary password on each one individually. There is no limit on the number of hidden folders in the free version.
