How to Recover Unsaved or Deleted Notepad++ Files

Losing a tab after a crash, restart, or accidental closure can wipe out hours of work in seconds. The good news is that Notepad++ may have stored a temporary snapshot even if you never clicked Save. This guide explains how to recover Notepad++ unsaved files, where to look first, and when a deleted file recovery scan is appropriate. If the missing content had already been written to disk, Magic Data Recovery can also search for deleted TXT files and lost Notepad++ backup copies.
Supports Windows 7/8/10/11 and Windows Server
Act before troubleshooting: Avoid installing programs, downloading large files, or running cleanup tools on the affected drive. New data may overwrite a deleted text file or backup snapshot.
Table of Contents
Can Notepad++ Recover an Unsaved File?
Sometimes. The answer depends on whether Notepad++ wrote the text to its backup folder before the loss occurred.
Notepad++ can create a session snapshot of edited tabs at a set interval. The default backup location for a standard installation is usually:
- %AppData%\Notepad++\backup
However, this snapshot is temporary. According to the official Notepad++ user manual, Notepad++ uses periodic backups for changed files and removes a snapshot after the related file is saved. Closing an unsaved tab and choosing not to save it may also remove the temporary copy.
This distinction matters because Notepad++ recover files methods do not all solve the same problem:
| What happened? | Best first method | Can recovery software help? |
| Notepad++ crashed with the tab still open | Reopen Notepad++ and check the restored session | Usually unnecessary |
| An unsaved tab disappeared after a restart or update | Check the Notepad++ backup folder and session.xml | Possibly, if a snapshot existed and was deleted |
| A saved .txt, code, or log file was deleted | Check Recycle Bin, File History, then scan the drive | Yes, if the file has not been overwritten |
| A file was replaced or saved with unwanted changes | Check backup-on-save, Previous Versions, or cloud history | Recovery tools may find an older deleted copy |
| The document was never saved and periodic backup was disabled | No disk copy may exist | Usually not; software cannot reconstruct text never written to storage |
How to Recover Notepad++ Unsaved Files: 7 Practical Methods
Start with the least invasive option. Do not jump straight to a full disk scan if Notepad++ still has a valid session snapshot.
Method 1: Reopen Notepad++ and Check the Previous Session
If Notepad++ or Windows closed unexpectedly, launch Notepad++ once and wait for the tabs to load. When Remember current session for next launch and periodic backup were enabled, the program may reopen unnamed tabs such as new 1 together with unsaved changes in named files.
As soon as the missing tab appears:
- Select File > Save As.
- Give the document a clear filename and extension.
- Save it to a backed-up folder, preferably on another drive if the original disk has errors.
Do not repeatedly close and reopen the application. Session information can change during each launch, so save any recovered content immediately.
Method 2: Open the Default Notepad++ Backup Folder
For most standard Windows installations, the backup directory offers the fastest answer to how to recover Notepad++ unsaved files.
- Press Win + R.
- Paste %AppData%\Notepad++\backup and press Enter.
- Sort the folder by Date modified.
- Look for names such as new 1@2026-08-24_091500 or notes.txt@2026-08-24_091500.
- Copy promising files to a different folder before opening them.
- Open each copy in Notepad++ and save the correct one with its intended extension.
Do not search only for *.txt. Periodic snapshots often end with a timestamp rather than .txt, so a wildcard search can miss the exact file you need.
Method 3: Check the Configured or Portable Backup Location
The default AppData path is not universal. A portable Notepad++ installation can keep configuration files and backups near notepad++.exe. Users can also select a custom directory.
Open Settings > Preferences > Backup and inspect these options:
- Remember current session for next launch
- Enable session snapshot and periodic backup
- Backup path
- Backup on save settings
If a backup path appears, copy it into File Explorer. For portable mode, check the Notepad++ installation directory for a backup subfolder. When the application is unavailable, search the computer for folders named Notepad++, then inspect recently modified backup directories.
Keep in mind that session snapshot and periodic backup differs from backup on save. The former temporarily protects unsaved changes. The latter can create .bak copies when you actively save a document.
Method 4: Use session.xml to Find the Backup File
When the backup folder contains dozens of timestamped items, session.xml may map a missing tab to its snapshot.
- Close neither Notepad++ nor any recovered tabs until you have copied the relevant folders.
- Open %AppData%\Notepad++ in File Explorer.
- Copy session.xml and the entire backup folder to a safe location.
- Open the copied session.xml in another editor.
- Search for the original filename, tab name, or backupFilePath.
An entry may show the original filename and a timestamped backupFilePath. Browse to that path, copy the backup, and open the copy. This approach is especially useful when you need to recover Notepad files whose backup names no longer resemble the original project names.
session.xml is an index, not the document itself. If it references a backup that no longer exists, move on to Recycle Bin, Previous Versions, or a deleted-file scan.
Method 5: Search Windows, Recycle Bin, and Recent Locations
The file may be saved rather than unsaved. It might have a different extension, live in another folder, or have been moved accidentally.
Try these checks:
- Open File Explorer and search This PC for a distinctive phrase, the filename, *.txt, or the expected code extension.
- Sort results by Date modified.
- Check Home/Quick access > Recent and Notepad++’s File > Open Recent File menu.
- Open Recycle Bin and search by name, file type, or deletion date.
- If the file appears, restore it or copy it to a safe location.
For an accidental move or rename that just happened in File Explorer, Ctrl + Z may undo the operation. Use this only when you clearly know what the most recent file action was.
Method 6: Restore a Previous Version or Cloud Copy
Windows and cloud services can preserve versions that Notepad++ itself no longer holds. Right-click the original file or its parent folder, choose Properties, and open Previous Versions. Available copies may come from File History or restore-point data.
Before clicking Restore, use Open to inspect the version. Then copy the desired document elsewhere. Restoring in place can replace the current folder contents.
If the file lived in OneDrive, Dropbox, Google Drive, Git, or another synced location, check the service’s web-based recycle bin and version history. This is often the best fix for an overwritten file because it preserves distinct historical versions rather than searching raw disk space.
Searching %TEMP% is a low-probability fallback, not the main Notepad++ recovery method. Notepad++ normally relies on its configured snapshot folder. Still, you can enter %TEMP% in Run, sort by date, and inspect recent text-like files if every documented location is empty.
Method 7: Recover Deleted Notepad Files with Magic Data Recovery
Use recovery software when a saved TXT file, a .bak copy, or a Notepad++ snapshot existed on disk and was later deleted. This is different from recovering text that never left the computer’s memory.
Magic Data Recovery addresses the situations that built-in Notepad++ methods cannot: permanent deletion, an emptied Recycle Bin, accidental formatting, a RAW or damaged file system, and files lost from internal or external storage. It supports quick and deep scanning, previews recoverable files before saving, and recognizes more than 5,000 file types.
To use it safely:
1. Stop writing new data to the drive that held the missing file.
2. Download and install Magic Data Recovery on another drive when possible.
Supports Windows 7/8/10/11 and Windows Server
3. Launch it and select the affected partition or storage device.

4. Start the scan, then filter results by path, file type, name, size, or modification time.

5. Preview likely TXT, source-code, log, .bak, or Notepad++ snapshot files.
6. Recover selected items to a different drive.

Why is this approach more reliable than searching random temporary folders? It scans storage for file-system records and recognizable file data rather than depending on one guessed path. It can therefore recover Notepad files that Windows no longer lists. Still, no responsible tool can guarantee recovery: SSD TRIM, secure deletion, physical damage, and overwritten sectors may make a file unrecoverable.
Notepad++ Backup Recovery vs. Data Recovery Software
Choosing the right method saves time and reduces unnecessary disk activity.
Option | Best for | Main advantage | Limitation |
Reopen previous session | Crash or forced restart | Fast and built into Notepad++ | Depends on session settings and intact snapshots |
Notepad++ backup folder | Unsaved changes captured periodically | Preserves the latest temporary text | Snapshot may disappear after saving or discarding the tab |
Backup on save / .bak | Older version of a saved file | Simple copy with readable content | Must have been enabled beforehand |
Windows or cloud version history | Overwritten or synced documents | Can restore multiple versions | Requires prior backup or synchronization |
Magic Data Recovery | Deleted saved files or deleted snapshots | Scans beyond visible folders and supports damaged file systems | Cannot recover text that was never written to disk |
The best Notepad++ recover files workflow is therefore layered: check the active session, copy the backup folder, inspect version history, and scan the drive only when a disk copy likely existed.
Why the Notepad++ Backup Folder May Be Empty
An empty folder does not automatically mean Notepad++ malfunctioned. Common explanations include:
- Periodic backup was disabled before the loss.
- The interval had not elapsed before the crash.
- You saved the file, so Notepad++ removed the temporary snapshot.
- You closed the tab and chose No when asked to save.
- Notepad++ uses a custom or portable backup path.
- Another Windows account owns the relevant AppData folder.
- A cleanup utility, antivirus action, profile reset, or storage error removed the files.
- Multiple Notepad++ instances used different session behavior.
If you suspect deletion, preserve the folder and drive before running a scan. Continuing to work on the same system partition can overwrite the very snapshot you want to find.
How to Prevent Lost Notepad++ Work
Once you know how to recover Notepad++ unsaved files, spend a minute preventing the next incident.
- Open Settings > Preferences > Backup.
- Enable Remember current session for next launch.
- Enable session snapshot and periodic backup and choose a sensible interval.
- Turn on backup on save for important work and use a dedicated backup directory.
- Save new tabs early with meaningful names.
- Store critical documents in a versioned or synced folder.
- Use Git for code and maintain a separate, tested backup for irreplaceable notes.
Periodic snapshots are a safety net, not an archive. If a document matters, save it as a real file and include it in a regular backup plan.
Conclusion
To resolve how to recover Notepad++ unsaved files, first reopen the previous session, inspect %AppData%\Notepad++\backup, verify the configured backup path, and use session.xml to match tabs with snapshots. For saved files, also check Recycle Bin, Previous Versions, and cloud history.
When a TXT document or snapshot was actually written to disk and later deleted, Magic Data Recovery is worth trying because it can scan deleted files, formatted storage, and file-system errors while letting you preview results. It complements built-in backups; it does not invent content that was never stored. For more safe-recovery principles and related methods, visit the deleted file recovery guide.
Supports Windows 7/8/10/11 and Windows Server
FAQs About Notepad++ File Recovery
Where does Notepad++ store unsaved files?
With periodic backup enabled, a standard installation usually stores snapshots in %AppData%\Notepad++\backup. A portable installation or custom configuration may use another directory. Check Settings > Preferences > Backup for the active path before assuming the files are missing.
How do I recover a closed unsaved tab in Notepad++?
Reopen Notepad++ first, then inspect its backup directory for a recently modified new N@timestamp file. If you deliberately closed the tab and declined to save it, Notepad++ may have removed the snapshot, so recovery is less certain.
Can Notepad++ recover files after a computer restart?
Yes, if session memory and periodic backup were enabled and their files remain intact. Launch Notepad++ once and check restored tabs. If nothing appears, copy the backup folder and session.xml before trying more invasive recovery steps.
Why is my Notepad++ backup folder empty?
Periodic backup may have been disabled, the snapshot interval may not have elapsed, or Notepad++ may use a different path. The program also removes temporary snapshots after a file is saved or an unsaved tab is discarded.
Can I recover an unsaved Notepad++ file from the Temp folder?
You can check %TEMP%, but it is a secondary fallback. Notepad++ normally stores periodic snapshots in its configured backup folder, not the generic Windows Temp directory. Focus on the official backup path and session files first.
Can Magic Data Recovery recover an unsaved Notepad++ file?
It may recover a deleted Notepad++ snapshot or a previously saved text file if that data reached the disk and has not been overwritten. It cannot reconstruct an unsaved memory buffer that Notepad++ never wrote to storage.
How can I recover a permanently deleted TXT file?
Stop using the affected drive, check available backups, and scan it with a file recovery tool. Save recovered files to another drive. Results depend on whether Windows, SSD TRIM, or later activity has overwritten the original data.
Does reinstalling Notepad++ restore unsaved files?
Usually not. Reinstallation does not recreate a missing snapshot and may alter configuration data. Copy the existing Notepad++ AppData and backup folders first. Search or scan for lost files before installing anything on the affected drive.
Jason has over 15 years of hands-on experience in the computer data security industry. He specializes in data recovery, backup and restoration, and file repair technologies, and has helped millions of users worldwide resolve complex data loss and security issues.
