For Windows
Is it safe to keep passwords in a text file?
No. A .txt file is not encrypted: anyone who gets the file, and any program running under your account, can read it. On Windows, the search index stores the text of text files, and if your Desktop or Documents are backed up to the cloud, the file is uploaded too. Keep passwords in a password manager or in an encrypted file instead.
Disk encryption such as BitLocker or device encryption helps when a laptop is lost or stolen, but while you are signed in, the file is as readable as before. Whatever you choose, use a strong, unique password for the encrypted file and keep a backup.
Updated
What can I do without extra software?
Reduce the risk of an existing .txt
- Check that the folder with the file is not backed up to the cloud (OneDrive: Settings › Sync and backup › Manage backup).
- Move the passwords into a password manager or an encrypted file, then delete the .txt and empty the Recycle Bin.
- Change passwords that were in the file if it was ever on a shared PC, a USB stick or in the cloud.
Encrypt files with Windows (Pro, Enterprise, Education)
- Right-click the file or folder and choose Properties › Advanced….
- Select Encrypt contents to secure data and confirm.
- Back up the encryption key when Windows offers it: without the key, the file cannot be opened.
File encryption (EFS) is not available in Windows Home. It is tied to your user account, so programs running as you can still read the file.
What protects against what?
| Option | Protects against | Does not protect against |
|---|---|---|
| Plain .txt | Nothing. | Anyone who gets the file, cloud copies, the search index, any program running as you. |
| Disk encryption (BitLocker, device encryption) | A lost or stolen PC or a removed disk. | Anyone or anything using your signed-in account. |
| File encryption (EFS) | Other user accounts and a removed disk. | Programs running as you; not available on Home. |
| Password manager or encrypted file | Anyone who gets the file without the master password. | Malware that captures what you type while the file is open. |
Is there a simple encrypted file without installation?
SystemUtils Secure Note is a free encrypted text editor in a single .exe for Windows 11 and 10 (x64). The text is stored encrypted inside the program’s own file with AES-256-GCM and XChaCha20-Poly1305; the key is derived from your password with Argon2id. The password has at least 12 characters and is entered on the secure desktop, which ordinary programs cannot read.
Drop the .txt onto the window and Secure Note creates a separate locked document next to it. The original .txt stays unencrypted, so delete it afterwards; on an SSD, secure deletion cannot be guaranteed. A forgotten password cannot be recovered, and text typed into the document is not protected from a keylogger.
Questions
Is a .txt on an encrypted disk safe?
Only against loss or theft of the PC. Once you are signed in, any program running as you can read it.
Does Windows search read my text files?
Yes. For files with text, the contents are indexed on the device, and installed apps may be able to read data in the index.
What is the safest way to delete the old .txt?
Delete it and empty the Recycle Bin, then change the passwords. Secure deletion on an SSD cannot be guaranteed, so changing the passwords is the reliable step.
Sources
- Microsoft Support: Search indexing in Windows(opens in a new tab)support.microsoft.com
- Microsoft Support: Back up your folders with OneDrive(opens in a new tab)support.microsoft.com
- Microsoft Support: How to encrypt a file or folder(opens in a new tab)support.microsoft.com
- Microsoft Learn: BitLocker overview(opens in a new tab)learn.microsoft.com
Settings names can change with Windows updates.