Pre-launch — your 10 free credits are reserved for launch day. Join the waitlist
formatters · free tool

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

Input
<a><b>1</b></a>
Output
<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