Can you lock a folder with a password without software?
Look up how to lock a folder without software and you'll find a .bat file for Notepad, a box in Properties and the zip option. None of them puts a password on a folder. Here's what each really does, on which edition of Windows, and the honest ways to lock files without installing an app.
Check your edition first: Settings → System → About, under Windows specifications. Home has fewer built-in options.
The .bat "folder locker": what it really does
The script many how-tos share creates a folder called Locker. "Locking" runs two commands: ren, which renames the folder to a disguised name ("Control Panel" followed by a long identifier), and attrib +h +s, which marks it hidden and system. "Unlocking" asks for a password with set /p, compares it with the password typed into the script, and reverses both steps. Why it isn't a lock:
- The password is in plain text. Anyone who opens the .bat file in Notepad can read it.
- Nothing is encrypted. The files inside are untouched. When we ran its two locking commands on a test folder on Windows 11 Home,
dir /astill listed the "locked" folder, a file inside opened without the password, andcipherreported the file as not encrypted. - Anyone can undo it without the password.
attrib -h -sand a rename reverse it, and unticking Hide protected operating system files in Folder Options shows it. - Unless device encryption or BitLocker is on, the drive can be read in another PC. Microsoft notes that data on a lost or stolen device can be reached "by transferring the device's hard drive to a different device".
We don't reproduce the script. If you use one, unlock it and protect the files another way. The Hidden box and attrib have the same limits: see how to hide a folder in Windows 11.
"Encrypt contents to secure data": Pro only, and no password
EFS is Windows' own folder encryption, on Pro, Enterprise and Education:
- Right-click the folder, select Properties and then Advanced...
- Tick Encrypt contents to secure data and select OK.
- Select Apply, choose Apply changes to this folder, subfolders and files, and select OK.
- Back up your key: in Command Prompt,
cipher /xfollowed by a file name on a USB stick saves your EFS certificate and keys. Keep that backup off the PC, along with any password you set to protect it.
It never asks for a password. Microsoft's archived overview says encryption "is transparent to the user that encrypted the file", so anyone signed in as you opens the files normally. It keeps out other accounts and someone who takes the drive out, as long as your Windows password is strong. Copies don't always stay protected: the archived overview warns that copying to a non-NTFS volume can decrypt them, but since Windows 10 version 1607 EFS also works on FAT and exFAT drives, so a copy on a USB stick may instead stay encrypted and open only with your EFS key. On Home the box is greyed out: "File encryption is not available in the Home edition of Windows." See why it's greyed out.
Compressed (zipped) folders: no password
Show more options → Send to → Compressed (zipped) folder has no password step. Microsoft says Windows 11 version 24H2 "does not support operations on encrypted archive files" and suggests apps such as 7-Zip or WinRAR. Steps for those: how to password protect a zip file.
Locking files without installing anything
1. Encrypt files in your browser. clavisenc.com/encrypt.html is our free page. It's still software, but nothing is installed and nothing is uploaded: the file and password stay on your device.
- Open the page in a current Chrome, Edge, Firefox or Safari.
- Select Choose or drop files. It takes files, not folders: zip a folder first (Send to → Compressed (zipped) folder) and choose the zip.
- Type a password of at least 10 characters and enter it again in Type it again, or select Suggest a password, which fills both boxes. Write it down: with no recovery key, nobody can get it back.
- Select Encrypt, then Save next to each .enc file.
- Check that one opens at clavisenc.com/open.html with your password. Only then delete the originals and the zip.
Limits: up to 2 GB at a time on a computer and 1 GB on a phone. The .enc file keeps the original name (report.pdf.enc), so rename it if the name is private. There's no recovery key, so a forgotten password means a lost file. It uses AES-256-GCM with Argon2id, in the app's public format. As with any web page, you're trusting the code the site sends, and it hasn't been independently audited.
2. OneDrive Personal Vault, if you already use OneDrive with a personal Microsoft account. It's a protected area that unlocks with your fingerprint, face, PIN or a code, and locks itself after a period of inactivity (20 minutes on the web). On OneDrive's free plan it holds up to three files. The files live in Microsoft's cloud, and Microsoft notes that a file's name might appear in an app's Recent list after you open it.
Also turn on Settings → Privacy & security → Device encryption if your PC offers it; unlike BitLocker, it's available on Home. It protects the drive, not a folder. Make sure you know where its recovery key is (with a Microsoft account, it's saved to that account): see how to find your recovery key.
If you can install an app
- 7-Zip is free and open source. A 7z archive with a password uses AES-256, and Encrypt file names hides the names. You extract it to use the files.
- Clavis Encrypt (Windows 10 and 11, 64-bit, and Linux) is our app. The free plan encrypts files where they are, one or many at once, with AES-256-GCM and Argon2id. Each file gets a random name, with the real name stored inside, and you get a recovery key. Encrypting a whole folder in one step is part of Pro ($19 once); decrypting whole folders is free. It's closed source and hasn't been independently audited; its file format is public, with an open-source decryptor.
VeraCrypt and more: see how to encrypt a folder on Windows.
What each option really does
| Option | Install anything? | A password of its own? | What it does | Windows 11 Home? |
|---|---|---|---|---|
| .bat folder locker | No | No: anyone can read it in the script | Renames and hides the folder | Yes |
| Hidden box or attrib +h +s | No | No | Hides the folder | Yes |
| EFS (Encrypt contents to secure data) | No | No: your Windows sign-in | Encrypts files for your Windows account | No |
| Compressed (zipped) folder | No | No | Compresses | Yes |
| Browser page (encrypt.html) | No | Yes | Encrypts each file, up to 2 GB at a time | Yes |
| OneDrive Personal Vault | No, if you use OneDrive | No: fingerprint, face, PIN or a code | Protects files in the vault; three on the free plan | Yes |
| 7-Zip | Yes | Yes | Encrypts a copy, in one archive | Yes |
| Clavis Encrypt | Yes, no administrator rights | Yes | Encrypts each file; whole folders in one step in Pro | Yes |
What can go wrong
- A forgotten password means lost files. The browser page and 7-Zip have no way back in. Clavis Encrypt gives you a recovery key; keep it off the PC.
- Hidden is mistaken for locked. Hiding stops a glance, not a person who looks.
- Unencrypted originals stay behind. The browser page and 7-Zip make encrypted copies; delete the originals once a copy opens. Deleting is best effort: see what deleting really does on Windows 11. Backups hold copies too: Is Windows Backup encrypted?
- EFS without a key backup. Make the
cipher /xbackup before you rely on it, and keep it off the PC.
Questions
Can I lock a folder with a password without software?
Not with Windows alone. Without installing anything, encrypt the files (or a zip of the folder) on a browser page such as clavisenc.com/encrypt.html, or keep a few files in OneDrive Personal Vault.
How do I lock a folder in Windows 11 Home?
Home has no EFS, so "Encrypt contents to secure data" is greyed out, and no BitLocker Drive Encryption (Device encryption may be available). Use a browser page that encrypts files on your device, OneDrive Personal Vault for a few files, a 7-Zip archive with a password, or a file-encryption app such as Clavis Encrypt.
Is the .bat folder lock safe?
No. It renames the folder and marks it hidden and system. The files aren't encrypted, the password is written in plain text in the .bat file, and attrib -h -s undoes it without the password.
Can I put a password on a zipped folder in Windows?
No. Windows' Compressed (zipped) folder has no password option, and Microsoft says Windows 11 version 24H2 doesn't support operations on encrypted archive files. Use 7-Zip or WinRAR, or encrypt the zip on a browser page.
Does "Encrypt contents to secure data" add a password?
No. EFS uses a key tied to your Windows account, so anyone signed in as you opens the files normally. It's on Pro, Enterprise and Education only. Back up the key with cipher /x.
Is it safe to encrypt files on a website?
Only if the page encrypts on your device. clavisenc.com/encrypt.html never sends the file or password; it sends only a cookieless count of visits and finished files. You're still trusting the code the site sends, and it hasn't been independently audited.
Sources
- Microsoft Support: Find information about your Windows device (edition under System, About, Windows specifications)
- Microsoft Learn: ren (renames files or directories)
- Microsoft Learn: attrib (Hidden and System attributes)
- Microsoft Learn: set (/p reads a line typed by the user)
- Microsoft Learn: dir (/a lists hidden and system files)
- Microsoft Learn: [MS-GPPREF] GlobalFolderOptionsVista (ShowSuperHidden "Displays protected operating system files")
- Microsoft Learn: BitLocker overview (a drive moved to a different device)
- Microsoft Support: How to encrypt a file or folder (steps; not available in the Home edition)
- Microsoft Learn (archived): Encrypting File System overview (transparent to the user; copies to non-NTFS volumes)
- Microsoft Learn: [MS-FSCC] Appendix B, note 164 (EFS support for FAT and exFAT added in Windows 10 v1607)
- Microsoft Learn: cipher (/x backs up the EFS certificate and keys)
- Microsoft Support: Zip and unzip files (no support for encrypted archives)
- Microsoft Support: Protect your OneDrive files in Personal Vault (unlock methods, auto-lock, three files without a Microsoft 365 Family or Personal subscription, Recent lists)
- Microsoft Support: Device Encryption in Windows (available on Home; BitLocker on Pro, Enterprise, Education; recovery key attached to your Microsoft account)
- 7-Zip home page (free, open source, AES-256 in 7z)
- 7-Zip help: Add to Archive dialog (Encrypt file names)
- Clavis Encrypt: the public .enc file format and open-source decryptor
Last checked against Microsoft's documentation on November 15, 2026. The locking-command test and the dialog labels are from our own checks on a Windows 11 Home PC.
Related: how to hide a folder in Windows 11, how to encrypt a folder on Windows and password-protecting a zip file.