Replace Notepad With Notepad++ Using This Trick

Notepad Plus Plus Logo Icon

Notepad is a simple text editor for Microsoft Windows. It has been included in all versions of Microsoft Windows since Windows 1.0 in 1985. It is suitable for users who occasionally perform basic text editing. Advanced users and programmers often use more powerful third-party apps like Notepad++, Geany, Sublime Text, and others. Here is a trick that will allow you to replace Notepad with Notepad++. It works in all Windows versions, including Windows 7, Windows 8.1 and Windows 10.

Notepad++ is a powerful open source plain text editor that comes with tons of useful features, including syntax highlighting, bookmarks, file system navigation, bookmarks, code folding, spell checking, themes, customizable hotkeys, search and replace with regular expressions, and many more.

For plenty of users, Notepad++ needs no introduction.

The developer of Notepad++ has implemented a nice addition to the app. Starting with version 7.5.9, it is possible to make Notepad++ replace the built-in Notepad app.

There is a special value "debugger" that you can specify in the Windows Registry to make Windows start any app instead of the original app. This ability was created specially for developers to debug problems, but it can be useful in many other cases. Some examples:

The "debugger" string value usually contains the full path to the EXE file which should act as the debugger. It will get the full path to the running executable file. We can use this to override the executable file of the Notepad app.

Notepad++ v7.5.9 can be used as the 'debugger' for the Notepad app. In fact, you could also use previous versions of the app as the debugger for Notepad. However, older versions were opening the Notepad.exe binary in a tab along with the target file. Notepad++ v7.5.9 resolves this issue.

Replace Notepad With Notepad++ in Windows

  1. Open an elevated command prompt.
  2. Type or copy-paste the following command:
    reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe" /v "Debugger" /t REG_SZ /d "\"%ProgramFiles(x86)%\Notepad++\notepad++.exe\" -notepadStyleCmdline -z" /f
  3. Now, double-click on a text file or type notepad in the text box of the Run dialog or Start menu. This will open Notepad++.
  4. To undo the change, use the following command:reg delete "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe" /v "Debugger" /f.

The new options -notepadStyleCmdline and -z of Notepad++ do the trick.

You can get the app here:

Download Notepad++

That's it.

Support us

Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:

If you like this article, please share it using the buttons below. It won't take a lot from you, but it will help us grow. Thanks for your support!

Author: Sergey Tkachenko

Sergey Tkachenko is a software developer who started Winaero back in 2011. On this blog, Sergey is writing about everything connected to Microsoft, Windows and popular software. Follow him on Telegram, Twitter, and YouTube.

17 thoughts on “Replace Notepad With Notepad++ Using This Trick”

    1. All I did was change %ProgramFiles(x86)% to %ProgramFiles%, then it worked, since I’m using the 64-bit version of NotePad++. Good luck!

  1. That’s handy. Now the question here’s how to reset the changes and make notepad again the default text editor?

  2. +1
    The hack make running “notepad” on the RUN dialog result em error.
    + you fortgot “:” before >>> reg

  3. Thanks a bounch..
    Only problem, I am using the 64b version of N++, so had to remove ” (86)” from the path..
    Otherwise it works

  4. For everyone coming to the comment section, see:

    The fact that notepad++ opens notepad.exe as text might be an n++ bug.

    1. I have opened an issue addressing this:

  5. Thank you! I love Notepad++. It’s so much better then what Windows offers. I always had hoped this was possible to replace. Cheers!

  6. Thanks for hacking Notepad++
    It’s work for sheel extension in Windows Explorer to edit a file with notepad++
    But, unfortunately, it’s only work for no-space-filename-and-folder only. If the folder or the file contains space, it doesnt work. How to hack it ?
    Thanks in advance

  7. Sadly there is no way to give notepad++ additional start options this way like -noPlugin next to the needed -notepadStyleCmdline -z. It gets ignored. Don’t now why. I simply want to start notepad++ faster if I just want to open a simple text file.

Leave a Reply

Your email address will not be published.

Exit mobile version
Using Telegram? Subscribe to the blog channel!
Hello. Add your message here.