Format and beautify XML
XML Formatter re-indents XML using line-based text processing, not a real XML parser, entirely in your browser — nothing is uploaded to a server. It correctly handles the XML declaration and self-closing tags without breaking indentation, and it's scanner-based rather than a plain-text regex: <![CDATA[...]]> sections, <!--...--> comments, and quoted attribute values are recognized as opaque and copied through untouched, so a '><' sequence inside any of them is never mistaken for a real tag boundary. It still doesn't validate whether the XML is well-formed, since it's a text-based indenter, not a true parser.
Is XML Formatter free to use?
Yes, completely free with no registration required.
Does it validate whether my XML is well-formed?
No — it's a text-based indenter, not a real XML parser, so it won't catch structural errors like unclosed or mismatched tags.
Does it handle the XML declaration (<?xml version="1.0"?>) correctly?
Yes — the declaration line is left alone and doesn't affect the indentation of the elements that follow it.
Is my XML uploaded to a server?
No, formatting happens entirely in your browser.