How-To

How to Make Notepad++ the Default Text Editor in Windows 11

Notepad++ window

Need a better text editor than Notepad? Give Notepad++ a try. This guide explains how to use Notepad++ as your default text editor on Windows 11.

Are you looking for a better way to edit text files, code, or other documents on your Windows 11 PC than the built-in Notepad?

If so, you might want to try Notepad++. Notepad++ is a free, open-source text editor that supports multiple languages, syntax highlighting, plugins, macros, and more. It’s also a popular choice among developers, programmers, writers, and anyone else who might be looking for a reliable and customizable text editor.

Notepad++ can handle large files, multiple tabs, regular expressions, auto-completion, and many other useful functions that aren’t available in the original Notepad. It can also be extended with plugins that add extra features like code formatting.

If you want to make Notepad++ the default text editor on your Windows 11 PC, follow the steps below.

How to Install Notepad++ on Windows 11

Before making Notepad++ the default text editor in Windows 11, you must install it on your PC first.  To install Notepad++ on Windows 11:

  1. Go to the Notepad++ download page and download the version that suits your system (32-bit or 64-bit). For most users, this should be the 64-bit version.
  2. Run the installer on your PC. First, choose your language (such as English) and click OK on the Installer Language window.
    Select Notepad++ language
  3. Click Next, and then I Agree to accept the license agreement.
    Accept Notepad++ license agreement
  4. Click Browse to choose the destination folder where you want to install Notepad++ or keep the default location.
  5. Select the optional components you want to install by checking the boxes next to them. For example, you can create a desktop shortcut, add context menu entries, or install specific plugins.
  6. Click Next and then Install to start the installation process.
    Begin Notepad++ installer
  7. Wait for the installation to finish, and then click Finish.

At this point, you should have successfully installed Notepad++ on your Windows 11 PC. You can launch it via the Start menu or from the desktop shortcut (if you chose to create one).

How to Set Notepad++ as Default Text Editor via Windows Settings

Once you’ve installed Notepad++, you can set it as your default text editor. One of the easiest ways to make Notepad++ the default text editor in Windows 11 is to use the Windows Settings app. This method lets you choose which file types to open with Notepad++ by default.

To set Notepad++ as the default text editor via Windows Settings:

  1. Right-click the Start menu and select Settings.
    Open Settings via Start menu
  2. Click Apps on the left, then click Default apps on the right.
    Set default apps on Windows 11
  3. Type Notepad into the Set defaults for applications search box.
  4. Select the Notepad option to expand it.
    Change notepad file extension options
  5. You will see a list of file types associated with Notepad by default (such as .txt, .log, etc.). Click on each file type you want to change and select Notepad++ from the list of available apps in the How do you want to open X files from now on? window.
    Set Notepad++ file extensions
  6. If you don’t see Notepad++ in the list, select Look for another app on this PC and navigate to the folder where you installed Notepad++.
  7. Select notepad++.exe and click Open.
    Choosing an application to open a file type on Windows 11
  8. Repeat this process for all the file types you want to open with Notepad++ by default.

You have successfully set Notepad++ as your default text editor for selected file types in Windows 11.

How to Set Notepad++ as Default Text Editor via Command Prompt or Windows Terminal

Another way to make Notepad++ the default text editor in Windows 11 is to use Windows Terminal (or the older Command Prompt). This method allows you to replace all instances of Notepad with Notepad++ in one go.

However, this method requires administrative privileges, involves you editing the Windows Registry, and may affect some system files that rely on Notepad. Use this method at your own risk and ensure you have a system backup before proceeding.  You should also consider backing up your Registry files first to allow you to roll back any changes.

To replace Notepad with Notepad++ on Windows 11:

  1. Right-click the Start menu and select Windows Terminal (Admin).
  2. In the Windows Terminal window, type the following command and press Enter:
    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
  3. This command will add a registry entry that will redirect all calls to notepad.exe to notepad++.exe instead, along with additional parameters.
    Switch to Notepad++ using Windows Terminal
  4. Once it runs correctly, close the window and restart your PC.
  5. If you want to roll back this step at any point and restore the original Notepad, open the Windows Terminal or Command Prompt again (with administrator privileges) and run this command:
    reg delete "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe" /v "Debugger" /f
  6. Windows Terminal (or cmd) will alert you if the command is successful.
    Switching back to Notepad on Windows 11

You can also use the Registry Editor to manually delete the key you created (HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe) or roll back to an earlier system restore file or Windows Registry backup.

Using Notepad++

Notepad++ is a powerful and versatile text editor that can replace the built-in Notepad in Windows 11. Using the steps above, you can begin using it as the default text editor on your Windows 11 PC. Looking for other plugins you can add to Notepad++? One option is to add spell-checking to Notepad++ using an add-in.

However, don’t discount the old and faithful Notepad, as you can do fun things with Notepad instead without using third-party alternatives.

3 Comments

3 Comments

  1. JamesFacts

    May 11, 2023 at 4:29 pm

    the cmdline doesn’t work for me. Windows 11 Home 22H2. I’m admin. Nothing works. Notepad still opens for EVERYTHING despite me using Settings to set EVERYTHING to Notepad++ (which appears in the list of programs to choose) and running that commandline and rebooting. Something is fcky.

    • Momo

      August 17, 2023 at 2:15 am

      The CMD requires you to put a carot sign (^) in front of expandable paths so %ProgramFiles% becomes ^%ProgramFiles^% . The full path should be:
      C:\Windows\system32>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

      … or whatever your default drive and install paths are.

      The Default app UI setting thing didn’t work for me not sure why. Maybe it is a Windows 10 thing. Great article otherwise :)

      • Momo

        August 20, 2023 at 2:07 am

        Apparently Windows does not like the relative path thing either way. The original should have been fine, as it replaces the “%ProgramFiles%” path with the absolute. However for some reason this did not work for me so for anyone who wants to fix this, just:
        – Open Windows Registry Editor
        – Go to “Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe”
        – Add String Value (Reg_SZ), Name it “Debugger”
        – Modify the Entry and add your full path: “C:\Program Files\Notepad++\notepad++.exe -notepadStyleCmdline -z” (Or whereever you saved Notepad++)

        That should fix it.

Leave a Reply

Your email address will not be published. Required fields are marked *

 

To Top