Try XML Tools. Plugins -> XML Tools -> Pretty Print (libXML) or (XML only - with line breaks Ctrl + Alt + Shift + B)
You may need to install XML Tools using your plugin manager in order to get this option in your menu.
In my experience, libXML gives nice output but only if the file is 100% correctly formed.
Answer from erjiang on Stack OverflowTry XML Tools. Plugins -> XML Tools -> Pretty Print (libXML) or (XML only - with line breaks Ctrl + Alt + Shift + B)
You may need to install XML Tools using your plugin manager in order to get this option in your menu.
In my experience, libXML gives nice output but only if the file is 100% correctly formed.
You need to install XML Tools from the Plugins menu item → Plugins Admin... → Plugins Admin dialog appears and then scroll to bottom of available plugins and check XML Tools, install it and then Ctrl + Alt + Shift + B OR the option for XML Tools above shows up.
Videos
What are the steps to format or beautify XML content in Notepad++ using the XML Tools plugin?
How to beautify XML in Notepad++ ?
First. You must have correct plugins. To Notepad++ 64-bit you must download XML Tools for 64-bit. Simple.
Second. The main folder for plugins in Windows 10 64-bit is in "C:\Users{win_user}\AppData\Local\Notepad++"
Third. In Notepad++ 7.6 or later versions, plugins must have additional subfolder. For Exapmple: "{main_notepad_folder}/plugins/XMLTools/XMLTools.dll" and dependencies are in main folder.
I got the 2.4.9.2 version of the XML tools to work with Notepad++ version 7.4.1 on Windows 10 64-bit by doing the following.
Make sure you have the 64-bit version of the tools. (My first mistake)
Copy the XMLTools.dll file to the plugins directory.
In the download there should be a dependencies folder. Copy all the files in there (I believe there were 6) into the Notepad++ working folder (where the exe file is)
Restart Notepad++
Since I upgraded to 6.3.2, I use XML Tools.
- install XML Tools via the Plugin Admin (Plugins → Plugins Admin... Then search for "XML Tools", check its box and click the "Install" button).
- use the shortcut Ctrl+Alt+Shift+B (or menu → Plugins → XML Tools → Pretty Print)


In older versions: menu → TextFX → HTML Tidy → Tidy: Reindent XML.
Install Tidy2 plugin. I have Notepad++ v6.2.2, and Tidy2 works fine so far.