How can I recover unsaved text in Notepad?

Adil Balti 0 Reputation points
2026-08-29T16:26:49.1366667+00:00

Hi, I accidentally closed Notepad without saving my text. Is there any way to recover the unsaved content or restore the previous Notepad session in Windows 11?

Windows for home | Other | Recovery and backup
0 comments No comments

2 answers

Sort by: Oldest
  1. Marcin Policht 108.1K Reputation points MVP Volunteer Moderator
    2026-08-29T17:22:32.6766667+00:00

    Unfortunately if you closed Notepad and clicked "Don't Save," your unsaved content is usually lost permanently, but you can check a few temporary locations just in case.

    Windows sometimes keeps temporary copies of app data while running. Press Windows Key + R to open the Run box, type %temp%, and press Enter. Look for files ending in .tmp or files modified around the exact time you lost your text. Right-click any likely files and open them with Notepad to see whether your text is there.

    You can also check the AppData Packages folder used by Windows 11 Notepad for session state files. Press Windows Key + R, type %appdata%, and press Enter. Go up one level to the AppData folder, then open Local, Packages, and Microsoft.WindowsNotepad_8wekyb3d8bbwe. Check the LocalState and TempState folders for any temporary text files or files modified around the time you lost the content.


    If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    hth

    Marcin

    Was this answer helpful?

    0 comments No comments

  2. Ramesh Srinivasan 87,525 Reputation points Independent Advisor
    2026-08-29T17:24:48.5233333+00:00

    Hi Adil,

    By default, Notepad is configured to continue the previous session when launched. If there was unsaved content during the last Notepad session, the temporary file is saved in the Notepad app's data folder.

    To see if there are any temporary files (unsaved content) created during the last session, please open the following folder:

    %LocalAppData%\Packages\Microsoft.WindowsNotepad_8wekyb3d8bbwe\LocalState\TabState
    

    Backup all the files by copying them to a folder on your desktop.


    Now, launch Notepad and see if it restores the earlier content.

    If Notepad doesn't restore the unsaved content, you should be able to restore the content from the copied .bin files from the TabState folder.

    Important: If the option "Start new session and discard unsaved changes" was enabled earlier, the above methods do note help. In that case, there is no way to recover the unsaved data.

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.