XML Formatter
Pretty-print, minify, and validate XML in the browser.
Formatting re-indents each element two spaces per level; minifying strips the whitespace between tags. Validation uses the browser's own XML parser, so the well-formed / error signal matches what a real parser sees. Note: indentation is structural and may shift significant whitespace inside mixed text content.
How to format XML
Paste your XML and choose Format to indent it two spaces per level, or Minify to strip the whitespace between tags into one compact line. The well-formed / error signal appears above the result.
Reading the validity line
If the parser finds a problem — an unclosed tag, a stray character — the error message is shown so you can fix it. Well-formed XML formats instantly with no warning.
Questions
Does it tell me if my XML is valid?
It reports whether the XML is well-formed using your browser's built-in parser — the same check a real XML reader does. It does not validate against a DTD or XSD schema, which is a separate, document-specific step.
Will formatting change my data?
Formatting only re-indents elements and collapses whitespace between tags. Be aware that in mixed content — text and elements together — whitespace can be significant, so review the result for documents where spacing matters.