You have a text file with something in it you would rather not explain — passwords, notes, a draft you are not ready to share. Anyone who opens your laptop can read it in one double-click. Password protect a text file properly and that stops being true.
The short answer first: Notepad cannot do it, and never could. Everything below is about what to use instead.
Can Notepad password protect a file? No, and here is why
Notepad is a text editor with no security features at all. There is no password option hidden in a menu, and the tutorials claiming otherwise are describing something else.
Most of them mean the Windows folder encryption checkbox, which is a completely different mechanism with its own conditions. A few describe a batch-file trick that renames folders. That one hides nothing from anyone who types the right command, and it has been losing people's files for years.
The same is true of TextEdit on a Mac, and of every plain text editor. Text files are the simplest format there is, which is exactly why nothing protects them by default.
How to encrypt a txt file on Windows 11, and the trap in it
Windows has built-in file encryption called EFS. Right-click the file, choose Properties, click Advanced, and tick "Encrypt contents to secure data".
It works, and it does less than people think. The key is tied to your Windows account, so the file opens with no password at all while you are logged in — it is protected from other accounts on the machine, not from you or anyone using your session.
Now the part that catches people out. EFS only exists on NTFS drives. Copy that file to a USB stick formatted as FAT32 or exFAT, and Windows quietly decrypts it on the way rather than warning you. The stick now holds a plain copy. We have watched people discover this the hard way, and it is not obvious behaviour.
Two more conditions worth knowing. EFS is missing from Windows Home editions, and if your account password is reset by an administrator rather than changed by you, the key can be lost with it — which puts you in the territory of losing access to your own file.
Using 7-Zip to password protect a folder or a single note
The archive route is the most portable one, and it works the same on Windows, macOS and Linux.
Install 7-Zip, right-click the file, choose Add to archive, set the format to 7z, pick AES-256 in the encryption box, and type a password. The result opens anywhere with the password and nowhere without it.
Tick "Encrypt file names" as well. Without it the archive still lists what is inside, so a file called bank-details.txt is visible to anyone who opens the archive without a password. That box is off by default and it is the single most missed setting in this whole process.
Avoid the older ZIP encryption if the software offers it. It is weak enough that consumer recovery tools break it, and the option often sits right next to the good one. If you want to build the archive in the first place, our bundle the files into an archive tool will do it, and you can encrypt the result afterwards.
The browser route, when you cannot install anything
Work laptops are the usual reason people end up here. No admin rights, no software requests, and a note that still needs protecting.
Our encrypt the file itself page takes any file, including a .txt, and hands back an encrypted copy with a password of your choosing. Nothing is installed and nothing is uploaded — the work happens in the tab. For a short note you would rather paste than save, the text encryption tool does the same job on the text directly.
The honest limits. It protects the file, not the machine — a managed laptop may already be watching what you type. And there is no recovery: forget the password and the note is gone, which is the same trade every real encryption tool makes.
What about the office applications already installed?
Word and Excel both password-protect their own documents properly, using real encryption rather than a flag. If your text is going to end up in a document anyway, saving it as a .docx with a password is a legitimate answer.
Two caveats. It is only strong in recent versions — files from the Office 2003 era use encryption that is trivially broken today. And it converts your plain text into a format that carries its own metadata: author name, edit history, revision times.
For a genuinely plain note, a wrapper around the original file keeps things simpler. Which mode that wrapper uses matters more than the key size, as we explain in which cipher mode to prefer.
Choosing between them
Match the method to what you are protecting against, because they are not interchangeable.
- Other people using this computer. EFS is enough, as long as the file never leaves an NTFS drive.
- A file that has to travel. An encrypted 7z archive, or the browser tool. Both survive being emailed or copied to a stick.
- Cloud storage. Encrypt before it syncs, not after, and check the version history afterwards.
- A stolen laptop. Whole-disk encryption, which is a different job from any of the above.
One habit matters more than the choice. Whatever you use, decrypt the result once and check it opens before deleting the original. Every method on this page has produced an unopenable file for somebody, usually because of a mistyped password rather than a flaw.
Protecting a text file without kidding yourself
The file is the easy part. Copies are the hard part — the draft in your email drafts folder, the version in the recycle bin, the backup that ran last night, the thumbnail cache.
Encrypting one file does nothing about any of those, and no tool on this page will tell you they exist. Find them and deal with them, then encrypt what remains. That is the whole job, and the encryption is the small half of it.
