Windows 11 does not provide a built-in “password protect this .txt file” button in Notepad. If a text file contains private information, protect the data with Windows encryption or place it in an encrypted container/archive using a trusted tool. Simply renaming the file, hiding it, or changing its extension does not protect its contents.
Option 1: Encrypt the File with Windows EFS
On Windows editions that support Encrypting File System (EFS), you can encrypt a file so it is tied to your Windows user credentials. EFS is not available in every Windows edition, including typical Windows Home installations.
- Right-click the text file and select Properties.
- On the General tab, select Advanced.
- Enable Encrypt contents to secure data. If the option is unavailable, your Windows edition, file system, or environment may not support EFS.
- Select OK, then Apply.
- Choose whether to encrypt only the file or its parent folder when Windows asks.
- Back up the EFS encryption certificate and key when prompted. Store the backup somewhere secure and separate from the PC.
EFS Is Not a Separate File Password
EFS encryption is associated with a Windows user certificate rather than a password that you type every time you open the text file. Someone signed in to your Windows account can normally access files encrypted for that account. Protect the Windows account itself with strong sign-in credentials and lock the PC when you leave it.
Option 2: Put the Text File in a Password-Protected Encrypted Archive
If you specifically need a portable file that is protected by a password, use a reputable archiving or encryption application that supports strong encryption such as AES. Create an encrypted archive, add the text file, choose a strong unique password, and verify that the archive requires the password before deleting any unencrypted original.
Windows’ built-in ZIP behavior varies by version and does not provide the same password-encryption workflow as dedicated encryption tools. Do not assume that a normal ZIP file is private simply because it is compressed.
Option 3: Use an Encrypted Office Document Instead
If the information does not need to remain a plain-text file, an application that supports document encryption can be more convenient. For example, supported desktop Microsoft Office applications can encrypt certain documents with a password. Remember that losing an encryption password can make the document unrecoverable.
What Does Not Protect a Text File?
- Changing
.txtto another file extension. - Marking the file Hidden.
- Putting the file in an ordinary ZIP archive without encryption.
- Changing NTFS permissions while continuing to share the same Windows account with other people.
- Using a weak or reused password for an encrypted archive.
BitLocker Protects the Drive, Not an Individual Text File Password
BitLocker or Device Encryption can protect data on a drive when the device is offline or lost, but it does not add a separate password prompt to one text file after an authorized user signs in. Drive encryption and per-file protection solve different problems.
Option 4: Store It in OneDrive Personal Vault
If you use OneDrive, Personal Vault is a protected folder that needs a second check, such as a PIN, fingerprint, face or a code, before it opens. It locks itself again after a short period of inactivity. Free and standalone OneDrive plans can keep up to three files in Personal Vault, which is enough for a few important notes. Microsoft 365 subscribers can store as many as they like. Open your OneDrive folder in File Explorer, open Personal Vault, follow the setup steps, and move the text file into it.
Troubleshooting
- Encrypt contents to secure data is greyed out. You’re probably on Windows 11 Home, which doesn’t include EFS, or the file is on a FAT32 or exFAT drive. Use an encrypted archive or Personal Vault instead.
- You can’t open an EFS file after reinstalling Windows. The new account doesn’t have your certificate. Import the certificate backup (.pfx file) you saved when you encrypted the file. Without it, the file can’t be recovered.
- Other people on the PC can still open the file. Check they aren’t signing in with your account. EFS only protects against other accounts.
- The archive opens without asking for a password. The password may only cover file contents, not the archive itself, or encryption was never applied. Create the archive again and test it before deleting the original.
Frequently Asked Questions
Can Notepad put a password on a file?
No. Notepad has no password or encryption feature. Use one of the options above to protect the file.
Is the original text file still readable after I create an encrypted archive?
Yes. The archive is a protected copy. Delete the original text file afterward, and empty the Recycle Bin, if you only want the protected version.
Does EFS protect the file if someone removes the drive?
Yes. The file stays encrypted on the drive, so it can’t be read in another PC without your certificate.
Summary
You cannot add a normal standalone password directly to a .txt file with Notepad. Use EFS when your Windows edition supports it and account-bound encryption fits your needs, or use a trusted encrypted archive/container when you need a portable password. Back up encryption keys and passwords because encrypted data can become unrecoverable if you lose them.
For a folder containing several files, our Windows 11 folder-protection guide explains EFS, recovery-key backups, and the difference between encryption and a hidden-folder script.
When protecting several documents together, the Windows 11 folder-protection walkthrough explains encrypted archives, EFS, and why a FolderLocker batch script only hides files. Remember that the original and extracted copies need their own protection.
Related: How to password protect a ZIP file on Windows 11.

Matt Jacobs has been working as an IT consultant for small businesses since receiving his Master’s degree in 2003. While he still does some consulting work, his primary focus now is on creating technology support content for SupportYourTech.com.
His work can be found on many websites and focuses on topics such as Microsoft Office, Apple devices, Android devices, Photoshop, and more.