XML Formatter
Pretty-print and indent XML, however badly it arrived.
Runs in your browser — your data never leaves it
Paste, type, or drop a file. Runs as you type.
Output appears here as you type.
Worked example
<a><b>1</b></a><a>
<b>1</b>
</a>This example is one of XML Formatter's test cases — if the tool stopped producing this output, the build would fail.
Questions
- Will it reformat a minified single-line XML?
- Yes — that's the main use. It re-indents with two spaces regardless of how the document arrived.
- What if the XML isn't well-formed?
- It refuses and tells you the line and column, rather than emitting a mangled document that looks formatted but isn't valid.
Related tools
XML Validatortakes xml
Check whether XML is well-formed and see exactly where it breaks.
XML to JSONtakes xml
Convert XML into JSON, attributes and text nodes included.
XML Difftakes xml
Compare two XML documents element by element.
XPath Testertakes xml
Run an XPath against your XML and see what it selects.