Notepad Plus Plus Logo Icon

Replace Notepad With Notepad++ Using This Trick

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!

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

    1. Ahmed Anssaien

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

      Reply
  1. Viney Dhiman

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

    Reply
  2. DIMM_V2

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

    Reply
  3. onSpeedDial

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

    Reply
  4. Alex

    For everyone coming to the comment section, see: http://web.archive.org/web/20190813012006/https://notepad-plus-plus.org/features/replace-notepad.html

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

    Reply
    1. Alex

      I have opened an issue addressing this: https://github.com/notepad-plus-plus/notepad-plus-plus/issues/7996

      Reply
  5. Alec

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

    Reply
  6. Ricardo

    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

    Reply
  7. Frank

    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.

    Reply

Leave a Reply

Your email address will not be published.