Skip to content

XML Formatter & Validator

Developer utilities · Done in 3 steps

Stays on your deviceFree · No sign-up
  1. 1Paste your XML
  2. 2
  3. 3
Loading tool…

About

Pretty-print or minify XML, keep comments and CDATA intact, and check well-formedness with the error's line and column.

How to use it

  1. 1Paste XML, open a file (.xml, .svg, .rss…) or click Sample.
  2. 2Choose Pretty print with an indent, or Minify.
  3. 3Check the well-formedness result underneath.
  4. 4Copy or download the result.
You give
XML documents, including SVG, RSS/Atom, sitemaps and config files
You get
Indented or minified XML and a validation verdict
Good to know
Checks well-formedness only (matching tags, quoting, single root) — it does not validate against an XSD or DTD. Whitespace inside text nodes is normalised when pretty-printing, so don't use it on whitespace-sensitive mixed content.
Privacy
Processed on your device. Nothing is uploaded, stored or logged.
Last tested
2026-10-28

FAQ

What does “not well-formed” mean?

The XML breaks a basic rule: an unclosed or mismatched tag, an unquoted attribute, an unescaped & or <, or more than one root element.

Are comments and CDATA kept?

Yes. Comments, CDATA sections, processing instructions and the XML declaration are kept as written. Minify can optionally remove comments.

Go further with AI