Secrets in Notepad Are Still Secrets

Windows 11 Notepad quietly saves unsaved tabs to disk. Handy for notes, risky for the passwords and tokens you paste mid-build.

Secrets in Notepad Are Still Secrets: an unlocked rune padlock on parchment beside a glowing terminal and a vault door

Symptom: none. That’s the problem. During a long server build I kept a Notepad tab open as a scratchpad: a root password, a tunnel token, an application passwordapplication password A separate password WordPress issues for a tool or script, which can be revoked on its own without touching your main login., an SSHSSH Secure Shell. The standard way to get a remote command line on a server, and one of the most attacked services on the internet. passphrase. I never clicked Save, so I assumed it lived only in memory.

Cause: modern Windows 11 Notepad restores your tabs after a restart, including ones you never saved. To do that, it writes their contents to disk, under your user profile in Notepad’s app data folder, as plain text. Your “temporary” secrets are sitting in a file you didn’t choose to create.

If that folder is synced, backed up or readable by malware running as you, so are your secrets.

Fix, in order:

  1. Move each secret into your password manager, one item per secret, named so future you can find it.
  2. Close the tab and choose Don’t save. That removes Notepad’s saved copy of the tab.
  3. If you ever did save it as a file, delete the file, check it never reached a synced folder, and empty the Recycle Bin.
  4. Rotate anything that sat in plain text longer than you’re comfortable with.

If you’d rather Notepad never kept unsaved tabs at all, it has a setting for what happens when it starts. Choose to start a new session instead of continuing the previous one.

Better habit: paste secrets straight from where they’re generated into the password manager, and copy them out of the password manager when you need them. The scratchpad step is the one that leaks.

Lesson: “I didn’t save it” isn’t a security control. Know where your tools write things down.

Applies to: Windows 11 Notepad with tabs and session restore. Checked October 2026.

ᛟ ᛟ ᛟ