Other Resources

Notepad Replacement

Notepad is a default text editor shipped with Windows. You may want to use Notepad++ instead of Notepad. However, there’s no obvious way to do it: You can run commands to edit the registry following command to make Notepad++ replace Notepad (run in cmd.exe with Administrator privileges).

For Windows 7 - Windows 10, use the following command:

reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe" /v "Debugger" /t REG_SZ /d "\"%ProgramFiles%\Notepad++\notepad++.exe\" -notepadStyleCmdline -z" /f

Note that you may need to use %ProgramFiles(x86)%\Notepad++\ to substitute for %ProgramFiles%\Notepad++\ if you have Notepad++ 32-bit installed, or use other path if your Notepad++ is installed in a non-default location.

For Windows 11 onward: first uninstall Notepad (just right-click on the Notepad shortcut in Start Menu and select Uninstall), and then run the commands below:

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

Note: Windows 11 introduced UWP version of Notepad that use the same technique as described (but with undocumented UseFilter) to replace the built-in Notepad. As UWP apps are started differently than regular apps, they cannot be replaced the same way and UWP Notepad must be uninstalled. Otherwise it would start when opening text files or when run from Start Menu. What`s more, to be able to again use built-in Notepad (now redirected to Notepad++) to open text files the NoOpenWith registry value must be removed (based on How to Restore Old Classic Notepad in Windows 11).

Undo the replacement

For Windows 7 - Windows 10, use the the following command to undo the replacement:

reg delete "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe" /v Debugger /f

For Windows 11 onward: reinstall Notepad (launch Microsoft Store via Start Menu, search “Windows Notepad”, select it and then click on Install button) and then run the commands below:

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

Registry Edit Warning

† Warning: editing your registry can be dangerous; edit your registry at your own risk; the developers of Notepad++ and contributors to this documentation cannot and will not be held responsible for mistakes made during registry changes or unintendended consequences of such edits

Explorer Right-Click menu

This section has moved to the “Alternatives” section of the Shell Extension (Right Click Context Entry) page of the User Manual.

Restartable App

Windows 10 and Windows 11 have a “restartable apps” feature (Windows Start Button > Settings > Accounts > Sign In Options > Restart Apps) which automatically saves the state of various “restartable apps” when you log out of Windows then back in. Starting with v8.5.8, Notepad++ is now a “restartable app” – so if you log out or reboot with Notepad++ running, and have that Windows setting active, then when you next log in, Notepad++ will reload right where you were. If you would like to disable Notepad++ from being restartable, add an empty config file called noRestartAutomatically.xml into %APPDATA%\Notepad++\ (for normal installations) or the Notepad++ installation directory (for other configuration settings).

Notepad++ Cheat sheet

The “Notepad++ Cheat Sheet” has been moved to become the User Interface page, including