How to Open Notepad with Previous Session in Windows 11
- 12 steps
- Needs administrator rights
Windows 11 Notepad can restore your open tabs and unsaved text the next time you launch it. That means you can close the app, or have Windows restart it, and carry on where you stopped. You control this in the app’s own settings.
Tabs and session restore need a recent Notepad from the Microsoft Store. If the options below are missing, open the Microsoft Store, go to Library, and update Notepad. To turn the feature on or off:
- Open Notepad.
- Click the gear icon in the top right corner. The Settings page opens.
- Find the startup section, usually called Opening Notepad. The label may differ slightly between app versions.
- Choose whether Notepad opens the content from your previous session or starts a new session. The new-session option discards unsaved changes.
The choice applies the next time Notepad starts. You can switch back at any time using the same setting, and no restart of Windows is needed.
Open Notepad and click the Settings (gear) icon. Under “When Notepad starts,” choose “Open content from the previous session” to restore your tabs. Select “Open a new window” for a fresh start each time.
Troubleshooting Notepad++ Session Issues
Notepad++ is a separate program and works differently. If tabs or files are missing after you reopen it, the usual cause is a problem with session.xml, the file that records which tabs were open. Notepad++ writes this file when you close the program normally, so a crash or forced shutdown can leave it stale or damaged.
Before you change anything, close Notepad++ completely. Check the system tray too, since the program can keep running there. While it is open it may overwrite any edits you make to its files.
Where does Notepad++ store session files?
Notepad++ keeps its previous session in a configuration file named session.xml. It lives in the AppData folder, a hidden folder in your user profile that holds application settings. The usual location is 📁C:\
To find the file:
- Open File Explorer.
- Select View > Show > Hidden items. The AppData folder now appears in your user folder.
- Open AppData, then Roaming, then the Notepad++ folder.
- Look for session.xml in that folder. You should see it alongside config.xml and other settings files.
If the XML inside session.xml is corrupted, Notepad++ cannot read it and your previous tabs will not load. Copy the file somewhere safe before you touch it. Portable copies of Notepad++, and installs that use a local configuration file, may keep their settings next to the program instead of in Roaming.
How to recover unsaved text files
If work is missing, check the backup folder. Notepad++ keeps temporary copies of unsaved files at 📁C:\
To make sure the program keeps recording your work, check these settings:
- In Notepad++, select Settings Preferences.
- Open the Backup page.
- Make sure Remember current session for next launch is ticked.
- Make sure Enable session snapshot and periodic backup is ticked. This setting writes copies of unsaved files at regular intervals, so a crash costs you less.
The official Notepad++ documentation covers more advanced configuration details.
Warning: Clearing AppData
A safer approach is to rename the folder instead of deleting it, so you can put it back if needed. Your own AppData folder normally does not need administrator rights. You may be asked for permission if you work on another user’s profile or a protected location. Close Notepad++ first, and copy anything you want to keep from the backup folder.
Summary
In short, Windows 11 Notepad manages sessions through a startup option in its own settings. Change the option, and the next launch behaves differently. Notepad++ records your current work in a session.xml file in its AppData folder, with extra copies in the backup folder. If tabs go missing in either program, start with these settings and files before you try anything more drastic.
Have a question about this guide?
Answered by AI from this guide. Good questions may be added to this page — please don't include personal details.
Did this guide fix your problem?
About the Author
Richard
Tech Writer, IT Professional
Richard is a writer at Geek Rewind who turns complex IT tasks into clear, step-by-step guides. He draws on years of hands-on experience in system administration and enterprise IT operations, focusing on Windows, Linux and WordPress: the problems people actually run into, and the fixes that work. His server and WordPress guides come from systems he runs himself. Richard builds and maintains the platform behind Geek Rewind, from its Ubuntu servers and Nginx configuration to its custom WordPress plugins. Many new tutorials start with readers' questions, and he's always glad to answer them in the comments.
No comments yet — be the first to share your thoughts!