Replacing Notepad with Notepad++ in Windows

Martin Brinkmann
Oct 22, 2018

The release of the text editor Notepad++ 7.5.9 introduces a new feature for Windows to replace the default Windows text editor Notepad as the default system editor.

While users may associate certain file types with Notepad++ so that these files are loaded in the editor and not another one when loaded, there was no direct option until now to replace Notepad as the default text editor during installation of Notepad++ or afterward.

Notepad is a powerful plain text editor that offers lots of features that Notepad does not offer: from the ability to load large text files (which Notepad cannot) over syntax highlighting to powerful search and replace features.

You may use Notepad++ for advanced features such as finding text in all files of a folder or plugin support to extend the functionality further.

Microsoft did add some features to the default editor Notepad in recent versions of Windows 10. The company added support for extended line endings as well as text zooming and better replace functionality.

The developer of Notepad++ added a new option to the program in version 7.5.9 that changes that. The solution is not fully automated as it needs to be run from an elevated command prompt window.

notepad replace windows

Note: The commands below contain path information. You can copy and paste the commands if you have installed Notepad++ in the default location but need to edit the path if you have not.

Here is how that works:

  1. Activate the Start menu of the operating system.
  2. Type cmd.exe and either
    1. Right-click on cmd.exe and select "run as administrator".
    2. Hold down the Ctrl-key and the Shift-key and select the cmd.exe result.
  3. Confirm the UAC prompt.
  4. The command prompt window that opens begins with the word Administrator to indicate that it is an elevated command prompt.
  5. Users who run a 32-bit version of Notepad++ need to run the following command:
    1. 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
  6. Users who run a 64-bit version of Notepad++ need to run the following command instead:
    1. 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
  7. You should get "the operation completed successfully as the return message when you run the command.

notepad-plusplus make default editor

The command changes information in the Windows Registry that replace the default text editor Notepad with Notepad++.

It is possible to undo the replacement at any time by running the following command from an elevated command prompt window (use instructions above to open one):

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

Now You: Do you use Notepad, Notepad++ or another text editor? (via)

Replacing Notepad with Notepad++ in Windows
Article Name
Replacing Notepad with Notepad++ in Windows
The release of the text editor Notepad++ 7.5.9 introduces a new feature for Windows to replace the default Windows text editor Notepad as the default system editor.
Ghacks Technology News

Previous Post: «
Next Post: «


  1. Sergio said on November 7, 2022 at 6:27 pm

    Doesn’t work under Windows 11. Up until Windows 10 (and before a Creator’s Update) the hack did indeed work like a charm, but after that point it doesn’t anymore.

  2. Anonymous said on March 15, 2022 at 4:59 am

    If you try to use the command line in Powershell, the double quotes and the escaping for the launching command will not be interpreted correctly. It’d be easier to do away to take advantage of the single quote literal syntax in Powershell and do away the two \” escaping (with produces two literal double quotes and wrap the entire 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

    There’s also a side benefit that the command in the blog post hard-code the location of %ProgramFiles% (snapshotted at the time of execution) while the single quote literal version above keeps the flexible environmental variables.

  3. Anonymous said on June 16, 2021 at 10:40 pm

    I just get

    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
    ERROR: The system was unable to find the specified registry key or value.

    1. Anonymous said on September 29, 2021 at 9:31 am

      If you get error running reg add command, check the quotes in the text you paste – all of them must be plain quotes “, not “smart quotes”.

  4. Ricardo said on June 25, 2020 at 9:39 am

    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

  5. Dan said on April 30, 2020 at 9:21 pm

    This doesn’t seem to work anymore. It takes the -notepadStyleCmdline and -z parameters and tries to actually create those files. It also tries to create a “notepad” file.

  6. Croatoan said on October 28, 2018 at 3:02 pm

    I use AkelPad. It suports tabs and sesion restore. It CPU and RAM usage is lover than Notepad++.

    1. Anonymous said on October 29, 2018 at 10:10 pm

      How lower? I use Notepad++ with many tabs open and memory doesn’t go more than 10 MB. It uses less resources that Notepad. If AkelPad uses 1-2 MB less I’ll pass. It doesn’t worth it to switch for 1-2 MB.

      1. Croatoan said on October 30, 2018 at 1:12 pm

        I use both. AkelPad uses 1-2 MB. I use it for replacing system Notepad and for viewing files.

        For editing (more than few words) I use Notepad++.

  7. kk said on October 24, 2018 at 7:15 am

    I can’t take seriously Microsoft’s Notepad when it doesn’t support tabs. Like I can’t take seriously Microsoft’s File Explorer for the same reason. I have switched to Notepad++ and Directory Opus because of that. Thank you Martin for this article, I was afraid to try to make Notepad++ the default text editor, it seems easier now.

  8. Jojo said on October 22, 2018 at 11:30 pm

    Unless you need the extensive functionality that Notepad++ offers, I’d look for a another solution because Notepadd ++ seems to get updated every 2 weeks or so! That’s like 26 updates a year! Year after year, after year. Whew.

    1. Anonymous said on October 29, 2018 at 10:05 pm

      Are you serious? If you don’t like the updates you can disable them. OK, this software runs on windows but it’s not windows home lmao.

    2. lehnerus2000 said on October 24, 2018 at 3:48 am

      I only use Notepad when I want to view a file (just to confirm something).
      I use Notepad++ when I want to edit files.

      I installed Notepad++ v7.5.8 on August 20.
      According to Notepad++’s home page v7.5.9 was released on October 15.

      That said, I do remember periods where there were lots of updates.

      Glary Utilities updates every 2 weeks, which annoys me so much I only install every 2nd version.

  9. Rick said on October 22, 2018 at 9:49 pm

    Of course there is always the plugin that you can install .. no need to make any changes other than to install.

  10. stefann said on October 22, 2018 at 7:40 pm
  11. Richard Steven Hack said on October 22, 2018 at 7:03 pm

    Not running Windows at the moment, even in virtual machines, but when I do I always use Notepad++ as it’s definitely the most powerful plain text editor around. But if you don’t need advanced features usually used for editing code, then regular Notepad is probably adequate.

    On Linux I use jEdit which is also available for Windows as it’s Java-based (which unfortunately requires Java, which is a security sinkhole, but not too dangerous on Linux.) jEdit is very powerful.

    1. Anonymous said on October 24, 2018 at 12:09 am

      You: “But if you don’t need advanced features usually used for editing code, then regular Notepad is probably adequate.”

      Microsoft: “Notepad was unable to correctly display the contents of text files created in Unix, Linux and macOS [until a recent Windows 10 build]” (

      Many, many open-source programs have readme and config files created in Linux. Would you say displaying those properly is an “advanced feature?”

      1. Jeff said on October 24, 2018 at 7:22 am

        You can use Notepad++ on Linux. Even if you don’t want to install Wine, there is a Notepad++ snap. You can have Notepad++ without installing Wine in your system. Notepad++ snap is available on Software. I personally prefer to use Geany on Linux though.

      2. Peterc said on April 29, 2019 at 1:43 am

        @Jeff: I just came across some useful-looking tips for configuring the Notepad++ snap in Linux, here:

        Optimizing Notepad++ on Linux
        Updated: January 30, 2019

        (I haven’t used them myself yet.)

  12. chesscanoe said on October 22, 2018 at 4:33 pm

    Martin’s (6.1) worked well for me. After it completed successfully, I typed “exit” to exit DOS out of habit.
    I did not use Indy’s Notepad Replacer because it was written before NotePad++ 7.5.9 was released.

  13. Anonymous said on October 22, 2018 at 4:08 pm

    Are we using Linux? Why there’s don’t the developer just put option to enable it?

  14. Zen said on October 22, 2018 at 3:26 pm

    Sublime Text ftw.

  15. pHROZEN gHOST said on October 22, 2018 at 3:04 pm

    Because I modify many types of files, I use NP++. I love the syntax highlighting and the extendibility (especially TextFX).

    This works like a charm. I created two batch files in the NP++ folder with the commands provided to allow me to toggle this merely by running the appropriate file in administrator mode.

  16. GoodThings2Life said on October 22, 2018 at 3:00 pm

    Although the Notepad found in Windows 10 1809 now features non-Windows Line-ending support, and it’s super fast and easy to use, I still prefer Notepad++ mostly for its more sophisticated find/replace functionality and tabbed document interface. I think if Microsoft ever implements the advanced find/replace functionality in stock Notepad, I’d probably switch back to stock.

    Anyway, this is a great tip for people who need it, and I’m glad this has been implemented.

  17. Mark Hazard said on October 22, 2018 at 2:49 pm

    There should be an easier way to do this. It’s a lot of typing and easy to make mistakes this way.
    I will stay with Notepad until there is an easier way to do it. I have Notepad++ (64 bit) but don’t use it much as it has few plugins. There is no plugin manager as with the 32 bit version but I like the speed of the 64 bit version.

    1. manouche said on October 22, 2018 at 10:51 pm

      The Plugin Manager was removed from Notepad++ 7.5 (Current Version is 7.5.9)


      “You may notice that Plugin Manager plugin has been removed from the official distribution. The reason is Plugin Manager contains the advertising in its dialog. I hate Ads in applications, and I ensure you that there was no, and there will never be Ads in Notepad++.
      A built-in Plugin Manager is in progress, and I will do my best to ship it with Notepad++ ASAP.”


      However, you still can download the latest PluginManager from github:

      Current Version works fine with the latest Notepad++7.5.9 (64 bit) for me.

      1. Mark Hazard said on October 26, 2018 at 2:50 am

        I tried again and got the plugin manager installed. Thank you for that. I think it was the improved installation instructions that did it. Which leads me back to my first post – it should be easier. The plugin manager should be incorporated in Notepad++ or give one the option to install it on installation. Sublime Text does this with its Package Manager.

      2. Mark Hazard said on October 24, 2018 at 11:37 pm

        I tried the “new” Plugin Manager and couldn’t get it to work properly. I haven’t tried it recently.
        I find that apps in GitHub are difficult to install.

    2. Klaas Vaak said on October 22, 2018 at 6:16 pm

      @Mark Hazard:
      1. typing errors can be prevented by copy/paste
      2. @Indy above suggested Notepad Replacer, that way you don’t even have to do copy/paste
      3. The 32-bit version of Notepad++ certainly DOES have a Plugin Manager, I am using the 32-but version with the PM.

      1. Wolfie0827 said on October 22, 2018 at 7:15 pm

        I have the 64 bit version and the beta Plugin manager works ok. it may not always be able to download the updates for plugins but is still good for informing you of an update being available so you can manually download and install it.

  18. Davin said on October 22, 2018 at 2:08 pm

    Notepad ++ is also available in the Microsoft Store for Windows 10. However, I don’t know if that version is kept updated as the one on the developer’s website.

  19. Taomyn said on October 22, 2018 at 2:06 pm

    I use Notepad Replacer as well it’s quite handy, but the new change at least makes scripting it for mass-deployment a little simpler.

  20. Indy said on October 22, 2018 at 1:10 pm
  21. Klaas Vaak said on October 22, 2018 at 12:51 pm

    @Martin: does this also work for the Notepad++ portable version?

  22. Pedro said on October 22, 2018 at 11:55 am

    I usually use Atom as a more powerful text editor. Ironically, Github was bought by Microsoft, so now Microsoft has two text editors. I like it a lot.

  23. Anonymous said on October 22, 2018 at 11:50 am

    The Windows 7 Notepad is plagued by its inability to open correctly text files with non-Windows line endings. I installed Notepad++ just because of that.

    1. Anonymous said on October 23, 2018 at 5:49 am

      Windows 10 notepad can already edit non-Windows line endings

      1. Doc said on October 24, 2018 at 6:35 am

        Only in version 1809 (September/October 2018), or “insider” builds as of May 2018; 1809 still hasn’t been rolled out to most users because of the “file deletion” bug. 1803 (March 2018) still has problems with Unix-style line endings.

      2. Anon3 said on October 24, 2018 at 12:16 am

        Windows 7 notepad cannot edit non-Windows line endings
        If the other anon was complaining about Windows 10 RTM or Anniversary Notepad, maybe your reply would’ve been useful.
        In the current context, your reply seems like you are telling the other anon to “upgrade” to 10 just for the new Notepad.

  24. RossN said on October 22, 2018 at 10:41 am

    Still loving NotePad3
    Good if you do lots of minor script editing.

  25. Yuliya said on October 22, 2018 at 10:05 am

    I like the regular notepad in Windows 7. It’s extremely simple, but it’s also lightweught and for 90% of my use it does its job fine. Whenever I comment I first type it in notepad then paste it on the site. Many times in the past pages failed to load and this method saved me from typing my comment all over again.
    I don’t necessarily mean here, it happened on sites using Disqus.

    1. gh said on October 22, 2018 at 8:25 pm

      Yuliya, have you forgotten about the “Textarea Cache” browser extension (or maybe it’s no longer a “compatible” extension)?

      Yeah, I too am still at Win7 nowadays (when not on linux) and the “suitable for 90% of my use” for stock notepad app became intolerable. Too often I was “left wanting”, felt crippled by its lack of oft-needed functionality, e.g. the “Edit } Line Operations } Sort” variants provided by Notepad++

      A followup ghacks article might point to a curated list of Notepad++ tutorials / videos. Casual users are probably unaware of its wealth of features, like “Alt + dragSelect” to select a rectangular selection of columnar text…

    2. John Fenderson said on October 22, 2018 at 5:57 pm

      I’m a big fan of the normal Notepad as well — I think it may be the stock Windows application that I use more than any other.

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

We love comments and welcome thoughtful and civilized discussion. Rudeness and personal attacks will not be tolerated. Please stay on-topic.
Please note that your comment may not appear immediately after you post it.