Guides ·
How to use XML Formatter
XML Formatter. Pretty-print and indent XML. Only whitespace between tags changes. Text, attributes, comments and CDATA are kept exactly.
The short answer
To format XML, paste it and click Format: the XML is checked for well-formedness and re-indented with 2 or 4 spaces or tabs, keeping comments, CDATA and the declaration. You can also minify it.
It runs in your browser. What you enter is not uploaded.
How to use it
Type or paste your input into the XML Formatter.
Choose any options you need.
See the result update instantly.
Copy the result or download it.
Limits worth knowing
Does formatting change my XML? Only whitespace between tags changes. Text, attributes, comments and CDATA are kept exactly.
Can it format SOAP and SVG? Yes. Any well-formed XML, including SOAP envelopes, SVG, RSS and sitemaps.