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 Overflow
Discussions

Notepad ++ and Pretty Print (XML Only with Line Breaks) not working
When I try to use the latest version of Notpad++ with XML Tools > Pretty Print (XML Only with Line Breaks) I get the following error: Errors detected in content. please correc them before applyi... More on github.com
🌐 github.com
3
May 25, 2021
Request/Question: xml-tool "pretty print - indent attributes" via commandline or in batch
But now I am dealing with a large ... all the xml files in a folder via python and put them back in another folder in a new format (just "pretty print - indent attributes"). I tried desperately to find a library, but none supported "indent attributes". So my idea now is to use Notepad++ via Commandline ... More on github.com
🌐 github.com
1
May 25, 2023
How can I make this readable?
View in HEX ... :) More on reddit.com
🌐 r/notepadplusplus
8
1
July 15, 2023
How to view a XML file? I don't understand these instructions.
I would highly recommend getting Notepad++. It’s free and you can use numerous programming languages including XML to view it with proper formatting. More on reddit.com
🌐 r/xml
9
3
March 3, 2024
🌐
freeCodeCamp
freecodecamp.org › news › xml-formatting-in-notepad-how-to-format-xml-files
XML Formatting in Notepad++ – How to Format XML Files
May 3, 2023 - The plugin will be downloaded and Notepad++ will restart: Step 4: Click "Plugins" again in the menu bar, hover on "XML Tools", and click "Pretty print" to format the XML file:
🌐
TMS Outsource
tms-outsource.com › home › how to format xml in notepad++ quickly
How to Format XML in Notepad++ Quickly
December 8, 2025 - Open your XML file in Notepad++. Just drag and drop if you’re into it; otherwise, use the File menu. Head to the Plugins menu. Find XML Tools. Click on it. Select the “Pretty Print” option.
🌐
MiniTool Partition Wizard
partitionwizard.com › home › partition manager › notepad++ format xml: how to format xml in notepad++ [full guide]
The Complete Guide on How to Format XML in Notepad++
November 28, 2024 - Step 1. With your Notepad++ opened, go to the Plugins tab and select XML Tools > Pretty Print or Pretty Print – indent attributes.
Find elsewhere
🌐
GitHub
github.com › notepad-plus-plus › notepad-plus-plus › issues › 9907
Notepad ++ and Pretty Print (XML Only with Line Breaks) not working · Issue #9907 · notepad-plus-plus/notepad-plus-plus
May 25, 2021 - When I try to use the latest version of Notpad++ with XML Tools > Pretty Print (XML Only with Line Breaks) I get the following error: Errors detected in content. please correc them before applying pretty print I get this regardless of the content. I do have a machine that has Notepad 7.3.1 with this plugin and it is working.
Published   May 25, 2021
🌐
GitHub
microsoft.github.io › XmlNotepad
XML Notepad
XML Notepad provides a simple intuitive User Interface for browsing and editing XML documents.
🌐
SourceForge
sourceforge.net › home › open source software › text editors › notepad++ plugins › files
Notepad++ Plugins - XML Tools 2.4.9 Unicode
Release 2.4.9.2 --------------- - Fix pretty print function infinite loop when data ends with <!-- or <![CDATA[ Release 2.4.9.1 --------------- - Patch pretty print function error which occurred when text contains "='" sequence Release 2.4.9 ------------- - Compilation of 64bit version of the ...
🌐
Notepad++ Community
community.notepad-plus-plus.org › topic › 21133 › xml-tools-plugin-can-t-get-pretty-print-feature-to-work
XML Tools Plugin - Can't get Pretty Print feature to work | Notepad++ Community
May 6, 2021 - I just copied the XML code you provided and pasted it in NP++ then selected Plugins --> XML Tools --> Pretty Print and it worked fine, then I toggled several times between Linearize and Pretty Print and it all went smooth.
🌐
JSON Formatter
jsonformatter.org › xml-formatter
Best XML Formatter and XML Beautifier
XML Formatter can be used as alternative of VSCode / Sublime / Notepad++. XML tidy supports WSDL Formatter, SOAP Formatter, XSD, POM, SGML, RDF, SVG, RSS and all xml data files which represents extensible markup languages. Free XML Formatter also works as XML Converter / Convertor to JSON. Know more about XML: How to Print XML? Python XML Pretty Print ·
🌐
Notepad++ Community
community.notepad-plus-plus.org › topic › 21892 › xml-tools-plugin-pretty-print-not-working-is-it-the-file
XML Tools Plugin: "Pretty Print" not working- is it the file? | Notepad++ Community
August 7, 2023 - I pasted it into a new Notepad++ v8.1.4 tab, changed that tab to XML, ran XML Tools 3.1.1.6-64bit Pretty Print on it (didn’t select anything, so it was the whole document), and it immediately and without difficulty it came up with:
🌐
GitHub
github.com › morbac › xmltools › issues › 199
Request/Question: xml-tool "pretty print - indent attributes" via commandline or in batch · Issue #199 · morbac/xmltools
May 25, 2023 - But now I am dealing with a large amount of files and I was looking for a way to read in all the xml files in a folder via python and put them back in another folder in a new format (just "pretty print - indent attributes"). I tried desperately to find a library, but none supported "indent attributes". So my idea now is to use Notepad++ via Commandline and call the plugin.
Published   May 25, 2023
🌐
Notepad++ Community
community.notepad-plus-plus.org › topic › 14344 › pretty-print-xml-by-default
pretty print XML by default? | Notepad++ Community
September 13, 2017 - The one line python script is : notepad.runPluginCommand(‘XML Tools’, ‘Pretty Print (XML only - with line breaks)’)
🌐
Appuals
appuals.com › home › microsoft windows › programs and apps
How to Format/Indent XML Files in Notepad++
March 10, 2023 - ... Click on Plugins and then choose XML Tools > Pretty Print (XML only –with line breaks) Tip: libXML option gives the nice output but only if the file is 100% correctly formed.
🌐
Scribd
scribd.com › document › 833288380 › code-formatting-How-do-I-format-XML-in-Notepad-Stack-Overflow
code formatting - How do I format XML in Notepad++_ - Stack Overflow
The document discusses how to format XML code in Notepad++, particularly for long lines that are difficult to read. It suggests using the XML Tools plugin for pretty printing and mentions other options like TextFX for reindenting XML. Users are advised to install the necessary plugins and provides ...
🌐
GitHub
github.com › morbac › xmltools
GitHub - morbac/xmltools: XML Tools plugin for Notepad++ · GitHub
This plugin is a small set of useful tools for editing XML with Notepad++. The plugin is based on MSXML. The plugin features are: XML syntax Check · XML Schema (XSD) + DTD Validation · XML tag autoclose · Pretty print · Linarize XML · Current XML Path ·
Author   morbac
🌐
FreeFormatter
freeformatter.com › xml-formatter.html
Free Online XML Formatter - FreeFormatter.com
This free online XML formatter and lets you chose your indentation level and also lets you export to file