How-To Geek

How To Replace Notepad with Another Text Editor in Windows

Notepad is a Windows staple that hasn’t really changed in years. It’s fine as a basic text editor, but if you’d like to replace it with something a bit more powerful, then read on.

Text editors are great. They’re fast and easy to use for simple things like taking fast notes, keeping a dated log or journal file, or editing the odd configuration or even HTML file. Programmers and developers use them as one of their basic editing tools. Notepad has been the standard text editor included with Windows for many years. The problem is, as text editors go, Notepad is really basic. There are plenty of alternatives out there that add things like tabs, highlighted syntax, autocompletion, bookmarks, and customizable interfaces. And most of them are just as fast and easy to use as Notepad.

Sure, you could always just install one and use it like any other app, but we’re going to show you how actually replace Notepad so that your preferred text editor becomes the default tool when you—or any app—opens text files or calls on Notepad from anywhere in the Windows interface.

Step One: Choose a Replacement Text Editor

There are a ton of great Notepad replacements out there. Notepad2 and Metapad are both freeware favorites that work with the technique we’re describing in this article. If you use an editor professionally for development and don’t mind paying for extra features, you might also want to check out Sublime Text ($70) and UltraEdit ($99.95). The best editor for you will depend on what you need a text editor to do, so we encourage you to try them out and see what strikes your fancy before settling on a replacement. Once you do settle on a replacement, you’re ready to move on with the rest of these instructions.

We’re using Notepad2 as our example in this article. With its relatively minimalist interface, line numbers, and highlighted syntax, it’s long been a favorite around here.

Step Two: Make Sure the New Text Editor Will Work as a Replacement

The technique we’re using in this article is to actually replace the “notepad.exe” file in the Windows system folders with a copy of the EXE file for our chosen replacement editor. For this reason, the text editor replacement you choose will only work if its executable file can run outside its own folder. This usually isn’t the case with apps you have to install, so it’s best to look for an app that you can download as a self-contained ZIP package instead. Portable apps are ideal candidates.

We’ve already tested both Metapad and Notepad2, and both will work. If you’re using a different app, it’s easy enough to test whether it will work. Start by downloading the app you want to test and installing it if it’s an installable app. Next, you’ll need to find the app’s folder. If it’s a portable app, that’s just the folder you extracted. If it’s an installed app, you’ll find it in either your “Program Files” or “Program Files (x86)” folders.

When you’ve found the app’s folder, you should see just one file inside with an EXE extension.

Copy that executable file by selecting it and pressing Ctrl+C on your keyboard. Go to your desktop and paste the file there by hitting Ctrl+V. The idea here is to get the executable file somewhere all by itself, without the other stuff in its folder. Now, double-click that copied file and see if the text editor can run. If it does, you’re good to go. If it doesn’t, then it won’t work with the techniques in this article.

NOTE: You may have noticed that one of the long-standing favorite text editors—Notepad++—isn’t on our list. While it used to work with the techniques we’re discussing in this article, it’s gotten to be sophisticated enough an app that even the portable version can no longer run outside its own folder.

Step Three: Back Up Notepad

Since we’re going to be replacing the Notepad executable file, you’ll first want to back that file up. You likely won’t want to switch back to Notepad after getting used to a replacement, but you never know. Believe it or not, the “notepad.exe” file exists in multiple locations on your PC, and you’ll be replacing all of them. You can find the executables at the following locations:

  • C:\Windows
  • C:\Windows\System32
  • C:\Windows\SysWOW64 (only on 64-bit versions of Windows)

Use File Explorer to navigate to all of those locations. In each location, make a copy of the Notepad file by selecting the file, pressing Ctrl+C to copy it, and then pressing Ctrl+V to paste a copy.  and choosing the “Copy” command. You will likely be asked to provide administrative permission in order to write the copy of the file to whatever system directory you’re in. Go ahead and click “Continue.”

When you’re done, you’ll see the original and the copy you made.

You can leave the name the way it is or rename it whatever you like. We usually go with something like “Notepad – Original.exe.” When you’ve made a copy of Notepad in all three locations, you’re ready to move on to the next step.

Step Four: Take Ownership of and Delete Notepad

After making copies of all your “notepad.exe” files, the next step is to delete them. Unfortunately, it’s not as simple as just hitting the Delete key. Even if you’re logged on with an administrator account, you can’t just delete system files like Notepad. Fortunately, it’s still possible to take control of a file and delete it without resorting to nasty hacks like disabling UAC.

Note that you’ll need to perform the following steps in all the locations that “notepad.exe” exists, so look back at that list in Step Two if you don’t already have those windows open in File Manager.

Right-click the “notepad.exe” file and choose “Properties.”

In the Properties window, on the “Security” tab, click the “Advanced” button.

Note that the current owner of the file is listed as “TrustedInstaller.” You’re going to take ownership of the file with your account. Click the “Change” link.

In the “Select User or Group” window, in the “Enter the object name to select” box, type your user account name, and then click the “Check Names” button. If you typed a valid name, the name should change to show the full user name path with the PC name before it. You can then click the “OK” button.

NOTE: If you’re using a Microsoft account (rather than a local account), your official user name is just the first 5 letters of the full email address you used to set up the account. You’ve probably also noticed that those five letters were also used to name your user folder.

Back in the “Advanced Security Settings” window, you’ll see that your user account is now listed as the owner of the “notepad.exe” file. Go ahead and click “OK.”

Back on the “Security” tab of the file’s Properties window, click the “Edit” button.

In the Permissions window, select the “Administrators” group and then click to place a check mark in the “Allow” column for the “Full control” permission. Note that this will automatically fill in all the other check marks in the “Allow” column as well. You can now click “OK.”

A security alert will pop up warning you that you’re about to change permission settings on system folders. Go ahead and click “Yes.”

You can click “OK” to close the file’s Properties window.

Now, you should have all the permission you need to delete the “notepad.exe” file in this location. Just select it, hit the Delete key, and click Yes when you’re asked to provide administrative permission. When you’re done, “notepad.exe” should be gone, leaving you with just the backup copy you made earlier.

Go ahead and perform all these steps in all the locations where you found the “notepad.exe” file. When you’re done, you’re ready to move on to the next step.

Step Five: Drop In Your Replacement Text Editor

And now comes the easy part. Now that you’ve backed up and then deleted the “notepad.exe” file in all its locations, you’re finally ready to drop in the replacement executable file.

First, find the executable file for the replacement text editor. If it was one you tested out, it may still be sitting on your desktop. Otherwise, you’ll need to find it in the app’s folder. Copy that executable file by selecting it and pressing Ctrl+C.

Next, go to each location where you deleted the original “notepad.exe” file and paste the replacement by pressing Ctrl+V. You will likely have to provide administrator permission to paste the file, so go ahead and click “Continue.”

Right after you paste the copy, rename it to “notepad.exe.” You’ll likely need to provide administrator permission again for this step.

Don’t worry if the thumbnail changes to show the old Notepad icon. Go ahead and repeat these steps for all the locations where “notepad.exe” was originally located.

Once you’re done, you can test things out easily by hitting Start, typing “notepad,” and pressing Enter. Your new text editor should come up. And now, any time that Notepad is called by Windows or another app, you’ll get your preferred replacement editor instead.

Walter Glenn is a long time computer geek and tech writer. Though he's mostly a Windows and gadget guy, he has a fondness for anything tech. You can follow him on Facebook and Twitter.

  • Published 02/21/17
  • How about simply renaming notepad.exe, and creating a symlink (called notepad.exe) to the editor of your choice?

  • ESClaus

    or you could use this wonderfuly notepad replacer program by Binary Fortress. It is freeware and works great.

  • Tom Wilson

    I use Notepad++ and just associated text files with NP++ using the Open With menu. There's no need to move Notepad out of the way and do all of those other things.

  • Joe Dombrowski

    Notepad++, Notepad Replacer, Metapad... All have UIs from the distant past... Sublime Text looks nice, but is really expensive, and they have a spotty record on updating it.

    More modern alternatives include the truly great Visual Studio Code and Brackets

  • Kapela86

    Best way to do this is to use "Image File Execution Options" in registry, here's a reg file that I use

    Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe] "Debugger"="\"D:\\Programy\\Notepad++\\notepad++.exe\""

  • Shash Appan

    For Notepad++ you can use the NotepadStarterPlugin to replace notepad.

  • Tom Wilson

    Do not want. First, I don't like the light-on-dark style, and second - I actually prefer the simpler UI of NP++ to anything else I've come across - unless I need the actual project management of Visual Studio. In which case I'll load Visual Studio.

    Personally, I do not like the new design language coming out of Microsoft. Not at all. Windows and controls need borders. Clickable and tappable things should look distinct from the surrounding components. This trend toward borderless controls is driving me crazy.

  • Biswa

    :eight_spoked_asterisk:With CMD (admin):eight_spoked_asterisk:::

    set X="C:\Windows\System32\notepad.exe"takeown /F %X% & icacls %X% /grant administrators:F /Tren %X% notepad_old.exe.bakcopy "E:\Notepad2.exe" %X%

    Let the downloaded file is in E:\ drive.

  • Joe Dombrowski

    VS Code has a ton of pre-installed themes, and you can download from user made ones, too, so light theme vs dark theme isn't an issue. I happen to prefer light themes, though, everyone has a preference.

    I'll also disagree with you on the UI design. My day job is roughly 2/3 programmer, 1/3 UI/UX/Graphic designer, and I honestly think Microsoft and Google are doing pretty amazing things on the design front these days, but that, again, comes down to preference. I just wanted to provide a couple more modern looking alternatives for people like me! Cheers

  • Walter Glenn

    @wilsontp Yes, you could just associate TXT files and maybe drop an Open With Notepad++ (or whatever) to your context menu to make opening other files easier.

    But, the advantage of replacing notepad really comes if you have other programs that call notepad directly. Things like FTP programs that have an open command that doesn't respect your default settings, for example.

  • Visual Studio Code takes a while to start and eats the resources of my laptop (not a good one), while Sublime Text 3 is portable, does every thing I want (managing projects, references, etc), and I can't go without Sublime Text's mult-instance editing anymore, it's too good!!

    So no, for a simple text editor I don't want resource-heavy VS Code, dear god no!

  • I see all these things surrounding replacing system executables, editing environment path variables, editing registry keys etc...It seems like too much of a hassle in the dangerous zones of Windows just to replace a text editor...

More Articles You Might Like