XML Formatter

Pretty-print messy XML with clean indentation, minify it for transfer, or check that tags actually match.

Frequently asked questions

What does "well-formed" check?

That every opening tag has a matching closing tag in the right order — the most common breakage when XML is edited by hand. It doesn't validate against a schema (XSD/DTD); it checks structure, which catches the vast majority of real-world errors.

Are comments and CDATA preserved?

Yes — <!-- comments -->, <![CDATA[...]]> sections, processing instructions and the XML declaration all pass through untouched.

Why format XML at all?

Machine-generated XML often arrives on one enormous line. Indentation makes structure visible — which element contains which — turning debugging from archaeology into reading.

Last updated: 2026-07-13