[HOW TO ENCRYPT A TEXT FILE]
Encrypt a .txt file with a password so its contents cannot be read.
- Decide what you are protecting. Encrypt the file itself if it must stay protected on disk. Encrypt the contents into a text block if you only need to send them to someone.
- Choose a tool. Use browser-based encryption for no install, 7-Zip on Windows, or GnuPG with gpg -c on the command line.
- Set a strong password. Use a long passphrase or a generated password. Store it in a password manager immediately.
- Verify you can decrypt it. Decrypt the file once to confirm the password works before removing the original.
- Remove the plaintext. Delete the original file, empty the recycle bin, and check cloud version history and editor backup files for surviving copies.