Skip to content

User activity

Notepad TabState (Windows 11)

Notepad TabState cheat sheet: Windows 11 Notepad .bin tab files, unsaved text never written to disk, saved file paths, hashes, WindowState and parsing.

Location
C:\Users\<user>\AppData\Local\Packages\Microsoft.WindowsNotepad_8wekyb3d8bbwe\LocalState\TabState\*.bin
Proves
Text a user typed or pasted into Notepad, including content that was never saved, and which files were open
Timestamps
Saved-file tabs embed the file's last write time (FILETIME, UTC, stored in a variable-length encoding per community research); .bin NTFS times in UTC
Retention
Until the tab is closed or Notepad session restore is turned off; closed tab files are deleted but may be carved or found in shadow copies
Access
User or admin; plain files in the user profile, collect as a folder while Notepad is closed when possible
Type
File / file system
Windows
11
KAPE target
No dedicated target
Velociraptor
No dedicated target

What it is

The Store version of Notepad shipped with Windows 11 added tabs and, from 2023, session restore: when Notepad closes, open tabs (saved or not) come back on the next launch. To do that it continuously writes each tab to a binary file under TabState. For investigators this is unusual evidence: text the user typed or pasted without ever saving it is sitting on disk, together with the path of files that were open.

The feature appeared in Notepad app versions released through the Windows 11 Store during 2023 (version numbers in the 11.23xx range are commonly cited). Windows 10's classic notepad.exe does not have it.

Location

ItemPath (under %LOCALAPPDATA%\Packages\Microsoft.WindowsNotepad_8wekyb3d8bbwe\LocalState\)
Tab filesTabState\<GUID>.bin
Tab auxiliary stateTabState\<GUID>.0.bin, <GUID>.1.bin (settings and pending edits, per community research)
Window layoutWindowState\*.bin (tab order, active tab, window geometry)
App settings..\Settings\settings.dat (package root, registry-format hive)

What it proves

  • Proves the content of each open tab at the last write, including unsaved "Untitled" tabs: pasted credentials, draft messages, command lists, ransom notes being edited.
  • Proves a file was open in Notepad (full path) and, via the embedded hash and timestamp, what version of that file was loaded.
  • Shows unsaved edits made on top of a saved file, which may differ from the file on disk.
  • It does not give a typing timeline: there is no per-keystroke time, only file-level times.
  • It does not prove the text was authored by the user; it could have been pasted from elsewhere. Correlate with clipboard history.

Key fields

The format is undocumented and was reverse-engineered by the community; field order and types can change between Notepad versions.

FieldMeaning
Magic NPFile signature
Saved / unsaved flagWhether the tab is backed by a file on disk
File pathFull path of the saved file (UTF-16LE, length-prefixed)
File size, encoding, line-ending typeProperties of the saved file
Last write timeTimestamp of the saved file when loaded
SHA-256Hash of the file content as loaded
Selection start / endCursor or selection position
ContentTab text (UTF-16LE)
Unsaved chunksAppended insert/delete operations with CRC32 checksums

Lengths and several numeric fields are stored as variable-length unsigned LEB128 integers, which is why naive string searches only give partial results.

Timestamps

TimestampFormatNotes
Embedded file last write timeFILETIME, UTC (LEB128-encoded per community write-ups)Describes the file on disk, not the typing
.bin $SI creationNTFS, UTCApproximately when the tab was opened
.bin $SI modificationNTFS, UTCLast time Notepad flushed the tab, close to the last edit
WindowState filesNTFS, UTCLast change of the tab layout

Retention and clearing

  • Tab files persist across reboots until the tab is closed. Closing a tab (and choosing not to save) deletes its .bin files.
  • Users can disable restore in Notepad settings (When Notepad starts: start a new session); tab files are then no longer kept after Notepad closes (exact behaviour may vary by version).
  • Deleted tab files can be recovered from shadow copies or carved from unallocated space using the NP signature and UTF-16 text.
  • Uninstalling or resetting the Notepad app wipes the whole LocalState folder.

Collection

$np = "$env:LOCALAPPDATA\Packages\Microsoft.WindowsNotepad_8wekyb3d8bbwe\LocalState"
robocopy "$np" E:\case\notepad /E /COPY:DAT /DCOPY:T
Get-AppxPackage Microsoft.WindowsNotepad | Select-Object Name, Version

Record the Notepad package version: it tells you which format variant to expect. For all profiles, collect C:\Users\*\AppData\Local\Packages\Microsoft.WindowsNotepad_8wekyb3d8bbwe\LocalState\ with your triage tool.

Parsing tools

  • Community parsers: several open-source Python, Rust and C# TabState parsers exist on GitHub. Check which Notepad versions each supports before trusting its output.
  • 010 Editor / hex editor: for a first look, the UTF-16LE text is readable directly; templates from community research help decode fields.
  • Strings: strings -el on the .bin files quickly surfaces unsaved text.
  • Plaso / commercial suites: support is recent and uneven; verify against manual parsing.

Investigation tips

  • Always check unsaved tabs first: users paste passwords, API keys, IP lists and chat drafts into "Untitled" tabs and never save them.
  • Compare the embedded SHA-256 with the current file on disk: a mismatch means the file changed after it was opened in Notepad.
  • In ransomware cases, attackers staging notes or command lists in Notepad on a compromised host leave them here.
  • Correlate paths with jump lists and RecentDocs for when files were opened.
  • The same principle applies to other apps with session restore; compare with Sticky Notes.

Related artifacts

Glossary terms

Guides

All artifacts on one page: cheat sheet