Windows still hands .txt files to Notepad out of the box, and on Windows 11 Notepad is a Store-updated app that can be harder to dislodge than the old notepad.exe. If you want Notepad++ to open text files when you double-click them, you have two very different choices: a supported per-file-type default change, or a registry trick that redirects notepad.exe itself. This guide walks through both, shows how to test and undo each one, and explains what Windows updates are likely to disturb.
Table of Contents
- Two Ways to Make Notepad++ Your Default Editor
- Before You Change Defaults
- Set Notepad++ as the Default App on Windows 11
- Set Notepad++ as the Default App on Windows 10
- Add "Edit with Notepad++" to the Right-Click Menu
- Replace notepad.exe System-Wide with IFEO
- Test the New Default
- Roll Back Each Method
- What Windows Updates Can Break
- Conclusion
Two Ways to Make Notepad++ Your Default Editor
The phrase "replace Notepad" means different things, and mixing them up is how people end up with a broken shell.
| Default apps method | Replacing notepad.exe
|
|
|---|---|---|
| What changes | The handler for .txt and other chosen extensions |
Every launch of notepad.exe, system-wide |
| Scope | Per user, per file type | All users on the PC |
| Supported by Windows | Yes, through Settings | No, it is an unsupported interception |
| Survives feature updates | Usually, but handlers can be reset | Often undone or broken by updates |
| Difficulty | Easy | Advanced, with real rollback work |
| Best for | Everyday use | A legacy app that hardcodes notepad.exe
|
The first method is the one Microsoft documents and the one most people should use. The second relies on Image File Execution Options (IFEO), a debugging feature that makes Windows launch a different program whenever a named executable starts. It works, but it is a system-wide hack rather than a file-association change, and the Notepad++ maintainers themselves describe it as something to use only in rare circumstances.
Before You Change Defaults
Install Notepad++ from the official Notepad++ downloads page rather than a third-party download site. As of November 2026 the stable release is v8.9.9.1; release numbers move quickly, so check that page before downloading. The standard installer registers the Explorer shell extension for you, while the portable build does not.
Before touching file associations, work through the post-install setup steps for Notepad++ so themes, preferences, and updates are settled first. That guide covers the installer, package-manager, and portable routes, plus how to verify the download and keep the editor updated. Getting those basics done first means you are not troubleshooting a half-configured editor at the same time as a Windows association.
Run Notepad++ once normally and confirm it opens. Avoid leaving it in administrator mode for daily editing, because an elevated editor can have trouble receiving files from the shell extension.
Set Notepad++ as the Default App on Windows 11
Windows 11 puts file associations under Settings > Apps > Default apps. Microsoft's guide to changing default apps in Windows describes the two supported routes: set a default for a file type, or set defaults for an application.
To make Notepad++ handle .txt files:
- Open Settings and go to Apps > Default apps.
- Type
.txtinto the search box and select the matching result. - Select the current app (usually Notepad) and choose Notepad++ from the list.
- Confirm the change, then double-click a text file to test it.
If Notepad++ is not listed, choose Choose an app on your PC, browse to notepad++.exe, and add it. You can also right-click a file, choose Open with > Choose another app, pick Notepad++, and tick the option to always use it for that type.
Repeat the process only for extensions you actually edit: .log, .ini, .cfg, .md, .csv, .json, .xml, .html, .css, and .js are common choices. Do not assign executables, Office documents, or binary formats to a text editor; opening them can produce garbage, and saving can corrupt the file.
Windows 11 enforces this flow for a reason. Microsoft's documentation for the app defaults platform states that default app settings must be set through the Windows system UI, that programmatic changes without user interaction are blocked, and that the stored choice is protected by a filter driver. That is why registry edits and the File Association tab inside Notepad++'s own preferences may fail to stick on Windows 11. Use Settings, not a registry workaround.
You do not need to uninstall Notepad for this method. Assigning .txt to Notepad++ simply changes which app opens that extension.
Set Notepad++ as the Default App on Windows 10
Windows 10 uses the same idea with a slightly different layout. Open Settings > Apps > Default apps, scroll down, and select Choose default apps by file type. Find .txt, click the current icon, and choose Notepad++.
The right-click route works well on both versions:
- Right-click a
.txtfile and choose Open with > Choose another app. - Select Notepad++ or browse to its executable.
- Enable Always use this app to open .txt files and confirm.
On either version, the Set defaults by app view lists everything an installed app can open. It is handy for assigning several text extensions at once, but review the list before confirming; you do not want Notepad++ claiming file types you would rather leave with another program.
Add "Edit with Notepad++" to the Right-Click Menu
If you want to keep Notepad as the default but still have quick access to Notepad++, install the shell extension. The Notepad++ shell extension documentation explains that the standard installer adds an Edit with Notepad++ entry to Explorer's context menu for every file type. The portable edition does not include it, because registering a DLL normally requires administrator rights and is not portable.
On Windows 11, the entry may be tucked behind Show more options. Press Shift+F10 or use Shift+Right-click to reach the classic menu. If the entry is still missing, rerun the Notepad++ installer and keep the shell-extension component selected, then restart Explorer.
For a portable copy, you can try registering NppShell.dll manually from an elevated command prompt with regsvr32 NppShell.dll, but the Notepad++ documentation makes clear that this is not guaranteed to work outside a normal installation. A desktop shortcut or a Send to entry is often the simpler answer.
Replace notepad.exe System-Wide with IFEO
This is the part to approach carefully. IFEO lives under HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options. When Windows creates a process, a Debugger value stored under that executable's key is prepended to the command line, so a different program launches instead. Microsoft's explanation of the Image File Execution Options key describes this as a debugging mechanism, and warns that a wrong debugger path means the target program will not launch at all.
The Notepad++ manual's Notepad replacement page publishes the exact commands, but also labels the technique as not recommended. For Windows 7 through Windows 10, the command sets a Debugger value under the notepad.exe key and points it at notepad++.exe with the -notepadStyleCmdline -z arguments. On Windows 11 the procedure is different: Notepad is a packaged app, so it must be uninstalled first, and the debugger values go under numbered subkeys (notepad.exe\0, \1, \2) rather than directly under notepad.exe.
If you decide to proceed, the Windows 11 sequence from the Notepad++ manual looks like this (run in an elevated Command Prompt):
reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe\0" /v Debugger /t REG_SZ /d "\"%ProgramFiles%\Notepad++\notepad++.exe\" -notepadStyleCmdline -z" /f
reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe\1" /v Debugger /t REG_SZ /d "\"%ProgramFiles%\Notepad++\notepad++.exe\" -notepadStyleCmdline -z" /f
reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe\2" /v Debugger /t REG_SZ /d "\"%ProgramFiles%\Notepad++\notepad++.exe\" -notepadStyleCmdline -z" /f
reg delete HKCR\Applications\notepad.exe /v NoOpenWith /f
The manual also notes a newer wrinkle: as of October 2026, some Windows 11 builds without the notepad.exe stub need an extra App Paths entry and an empty notepad.exe file before the redirect works. That is a good illustration of why this method is fragile.
The risks are concrete:
-
A bad path disables Notepad entirely. If the Notepad++ path is wrong or the program is uninstalled, anything that calls
notepad.exefails to launch. - It is a known persistence technique. MITRE's ATT&CK entry for IFEO injection documents how attackers abuse debugger values for persistence and privilege escalation. Security tools may flag your redirect, and you are adopting the same mechanism malware uses.
- It catches everything, not just double-clicks. Installers, scripts, and recovery tools that expect Notepad will launch Notepad++ instead. Some of those tools may hang or misbehave.
- There is no per-type control. You cannot keep Notepad for one format and Notepad++ for another.
- Updates can undo or break it. A new Notepad package or a feature update may restore the original behavior or leave a redirect that no longer resolves.
Use it only when a specific program has an Edit in Notepad button or command with no setting to change the editor, and that program matters enough to justify the risk. The Notepad++ manual suggests asking the software vendor to add an editor setting instead. If you must do it, create a restore point, export the relevant registry key, and keep the rollback commands somewhere you can reach without Notepad.
Test the New Default
Create a file called association-test.txt with a line of text, then double-click it. The file should open in Notepad++ with the filename in the tab. If Windows still opens Notepad, the association did not take; return to Settings and reassign it.
Check each extension you changed individually. A common surprise is that .txt now opens in Notepad++ while .log or .md still opens in Notepad, because Windows tracks each type separately.
For the default-apps method, right-click the test file and open Properties. The Opens with line should show Notepad++. For the IFEO method, open Run, type notepad, and press Enter. With the redirect active, Notepad++ should launch; if you get "Windows cannot find 'notepad'", the redirect is broken and needs the rollback steps below.
Roll Back Each Method
Default apps: Return to Settings > Apps > Default apps, search each extension you changed, and set it back to Notepad or another app. If you used Open with > Always use this app, the same Settings page reflects that choice, so you can reverse it there.
Shell extension: Rerun the Notepad++ installer and clear the shell-extension component, or unregister the DLL from an elevated prompt with regsvr32 /U NppShell.dll. Restart Explorer afterward.
IFEO on Windows 10: Delete only the Debugger value you added:
reg delete "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe" /v Debugger /f
IFEO on Windows 11: Reinstall Notepad from the Microsoft Store, delete the three numbered debugger values, and restore the NoOpenWith value so the Store app can appear in Open with again:
reg delete "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe\0" /v Debugger /f
reg delete "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe\1" /v Debugger /f
reg delete "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe\2" /v Debugger /f
reg add HKCR\Applications\notepad.exe /v NoOpenWith /t REG_SZ /f
If Notepad still will not start, restore the registry export or the system restore point you made before the change.
What Windows Updates Can Break
Feature updates are the most common reason a working setup stops working. Microsoft's guidance on exporting and importing default app associations warns that Windows may reassign default handlers on upgrade and that missing or outdated entries can trigger "An app default was reset" notifications. In practice, a major update can quietly hand .txt back to Notepad.
The IFEO trick is even more exposed. The Notepad++ manual calls Windows 11 "a moving target" and documents build-specific workarounds, including the App Paths fix noted above. A new Notepad package can also re-register itself and take over again.
After any feature update, check your main extensions in Settings > Default apps and open a test file. If the association reset, reassign it through Settings; that is a two-minute fix. If an IFEO redirect disappeared, decide whether you still need it before reapplying the registry commands, because the same update may have changed the underlying behavior.
On a work or school PC, policy may override your choices. Microsoft's app defaults documentation notes that IT admins can control defaults through Group Policy and MDM, so a managed device may ignore or reset local changes. Ask the administrator rather than fighting the policy.
Conclusion
For almost everyone, the safe way to replace Windows Notepad with Notepad++ is to assign .txt and the other text extensions through Settings > Apps > Default apps, then add the Edit with Notepad++ shell entry for occasional use. That method is supported, per-user, easy to reverse, and does not interfere with installers, scripts, or recovery tools.
Replacing notepad.exe through Image File Execution Options is a different beast: system-wide, unsupported, abused by malware, and prone to breaking after Windows updates. Keep it as a last resort for a legacy program that hardcodes Notepad and offers no editor setting, and only after a restore point and an exported registry key. Whichever route you choose, test the association with a real file and know the rollback steps before you need them.
Top comments (0)