How to Replace Notepad With Notepad++ in Windows 11 and 10

Here's a little trick that allows you to replace the inbox Notepad app with a more powerful Notepad++ app. The latter offers more than the default app, which is a simple text editor. Actually, the method we are going to review works with any third-party editor, be it Notepad++, Geany, AkelPad or any other app.

Notepad is a classic app 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. Until Windows 11 it didn't receive drastic UI changes and advanced features. But now in Windows 11 it supports tabs, longer undo history, dark theme, document auto-saving, and much more. It has become a Store app.

Advanced users and programmers often use more powerful third-party apps like Notepad++, VS Code, Sublime Text, and so on. Some of them prefer having their favorite editor handle all the text files, for all scenarios and context menus. If you are one of them, this post may be of help. We will see how to make Notepad++ run instead of Notepad all the time.

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.

To replace Replace Notepad With Notepad++, you can use one of the following methods.

Replace Notepad With Notepad++ in Windows 11

  1. Open the Start menu and click All apps.
  2. In the app listing, find Notepad.
  3. Right-click the Notepad icon, and select More > Uninstall from the menu. Note: Once it will be removed, Windows 11 will revert to the classic Notepad without tabs.
  4. Now, open a new command prompt as administrator by typing cmd in the Run box and pressing Ctrl + Shift + Enter.
  5. In the command prompt, run the following commands, one by one.
    • 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
    • reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe\0" /v "FilterFullPath" /t REG_SZ /d "%ProgramFiles%\Notepad++\notepad++.exe" /f
    • reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe\1" /v "FilterFullPath" /t REG_SZ /d "%ProgramFiles%\Notepad++\notepad++.exe" /f
    • reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe\2" /v "FilterFullPath" /t REG_SZ /d "%ProgramFiles%\Notepad++\notepad++.exe" /f
  6. Now type notepad in the Run box or in the command prompt. This will instantly launch Notepad++ instead!

That's it. The modification is helpful in any scenario when you directly call the notepad.exe command. It will also work for the Edit command in the context menu.

The Edit command will now call your custom editor

It will now be redirect to Notepad++ or any editor of your choice.

Associate .txt files with Notepad++

If you now click on a text file, you may run into an issue that the OS doesn't open it in Notepad++ but shows an error instead like this:

This file does not have an app associated with it for performing this action. Please install an app or, if one is already installed, create an association in the Default Apps Settings page.

In this very case you need to manually associate Notepad++ with text files. Right-click any text file in File Explorer, and select Open with from the context menu. If you see the Notepad++ in the list, simply click it and then click Always.

However, if the app is missing, you have to click on "Choose an app on your PC" and navigate to the folder where you have the Notepad++ installed.

Select its executable file and click on the Always button in the Open with dialog.

Undo the modification

To undo the change and restore Notepad on Windows 11 for the notepad.exe command, get done the following steps.

  1. Open a command prompt as Administrator.
  2. Run the following commands one by one.
    1. reg delete "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe" /v "Debugger" /f
    2. reg delete "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe\0" /f
    3. reg delete "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe\1" /f
    4. reg delete "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe\2" /f
  3. Finally, head up over the official Notepad Store page and reinstall it by clicking on the Install button.

For any older Windows version the method is pretty same, but it doesn't involve Notepad removal, and extra Filter* values in the Registry. This was the only new thing to Windows 11.

Here are the details on how to set a custom editor in Windows 10 and older.

Replace Notepad in Windows 10, 8.1/8 and 7

  1. Press the Win + R keys together on the keyboard, and type cmd in the Run box.
  2. Now press Ctrl + Shift + Enter on the keyboard to open a new command prompt as Administrator.
  3. Type or copy-paste the following command.
    1. If you have a 32-bit Notepad++ app: 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
    2. If your Notepad++ is a 64-bit app: 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
  4. Now, double-click on a text file or type notepad in the text box of the Run dialog or Start menu. Voila, this will open Notepad++.

You are done! The command line arguments -notepadStyleCmdline and -z  do the trick.

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.

Download CMD Files to Save Your Time

Traditionally, to save your time, I have created a set of .cmd files to apply the modification. By using them, you don't need to type the commands manually, edit the Registry, and so on. The cmd files are arranged into folders by the OS version.

Under the Windows 11 folder you will find the files specific for this OS. The Windows 10 and older comes with the files that work in any Windows version released prior to Win11.

So, here are the files:

Download ready-to-use .cmd files

Extract the ZIP archive available by the above link to any folder of your choice.

The first file, replace notepad.cmd, does what is advertised. You may need to edit it if your Notepad is a portable app or it is installed under a custom folder.

Finally, the second file, undo.cmd, removes the alterations and makes the notepad command launch the default app.

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.

19 thoughts on “How to Replace Notepad With Notepad++ in Windows 11 and 10”

    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.

  8. D:\>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
    ERROR: Access is denied.

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.