Beautify or minify
- Beautify — one element per line, indented with 2 spaces, 4 spaces or tabs. Elements that only contain text stay on one line.
- Minify — removes whitespace between tags for the smallest file.
Validation
The formatter only works on well-formed XML: every tag closed, attributes quoted, one root element and special characters escaped. If something is wrong you get the parser's error so you can fix it.
CDATA sections, comments and processing instructions are preserved. Useful for sitemaps, RSS feeds, SVG files, Android layouts and API responses — validate a live sitemap with the XML Sitemap Checker.
Frequently asked questions
What is well-formed XML?
XML that follows the syntax rules: one root element, properly nested and closed tags, quoted attributes and escaped special characters.
Does it validate against a schema (XSD)?
No, it checks well-formedness, not schema rules.
Will formatting change my data?
Only whitespace between elements changes; text, attributes and structure stay the same.

