How to format/indent single-line XML files in Notepad++ x64

64-bitformatnotepadpluginsxml

For a long time the TextFX plugin did the job for the Notepad++ 32-bit version via the menu TextFX > TextFX HTML Tidy > Tidy: Reindent XML.

In January 2012 Notepad++ v5.9.8 didn't include the plugin anymore, probably due to new support of Unicode, which the developer of TextFX didn't embrace soon enough, see N++ v5.9.8 changelog vs N++ v5.9.6 changelog and TextFX's Future

Later was introduced a 64-bit version of Notepad++ which didn't even include the Plugin Manager (because it was itself a plugin, developed by a third party developer).

Until recently. In April 2017, the developer of the NppPluginManager announced there was a build of a x64 version available:

Now the problems of either using an outdated 32-bit version of N++ with the TextFX plugin, or trying to install Tidy2 (or others) to more recent versions of N++ (but still x32!!), are gone!

Best Answer

Download the latest 64-bit x64 (stable) release of Notepad++ here: https://notepad-plus-plus.org/download/ (version 7.4.2 at the time of writing) and start the usual install.

Download the latest 64-bit x64 (stable) release of NppPluginManager here: https://github.com/bruderstein/nppPluginManager/releases

Unzip downloaded archive in the N++ directory (e.g. C:\Program Files\Notepad++) and run N++

Go to the menu Plugins > Plugin Manager > Show Plugin Manager. Wait for the list to refresh and scroll down to find the XML Tools plugin (at the time of writing this, it's version 2.4.9.2). Check the corresponding box and click Install.

Wait for the install to complete, then once prompted, choose to restart N++.

[ Maybe you'll have to confirmed that you want to copy/use some dlls anyway (like libcurl.dll and libxml2-2.dll - don't know why) ]

Then you're done: go to the Plugins menu then XML Tools and you'll find your usual commands you were familiar with in TextFX.

Related Question