XML Formatter
Pretty-print XML with your choice of indentation, or minify it.
What is the XML Formatter?
XML is used in SOAP APIs, RSS feeds, e-invoicing, Office files and many configuration formats.
How does it work?
The XML is parsed by the browser’s XML parser and the document tree is re-serialised with indentation. Elements with only short text stay on one line.
Example
<a><b>t</b></a> becomes three indented lines.
Frequently asked questions
Is my data sent to a server?
No. This tool runs entirely in your browser; nothing you paste is uploaded or stored.
Are comments and CDATA kept?
Yes, comments, CDATA sections and processing instructions are preserved.
Related tools
Enable JavaScript to use this calculator.