What this does
This XML formatter indents XML so its structure is easy to read, or strips the extra whitespace to make it compact. It checks that the XML is well-formed (every tag closed, attributes quoted, one root element) and shows the line and column of any mistake. Comments, CDATA sections, processing instructions and the XML declaration are kept. It works for SVG, RSS, sitemaps and config files too.
How to use it
- Paste XML, open a file, or drop one onto the box.
- Choose an indent, or Minify.
- Copy or download the result.
FAQ
Does it validate against a schema (XSD)?
No. It checks that the XML is well-formed, which catches unclosed tags, bad nesting and broken attributes. Schema validation needs the schema file and a server-side validator.
Is my XML uploaded?
No. It is parsed by your own browser and never leaves your device.
Will formatting change my data?
Only whitespace between tags changes. Text inside elements, attributes, comments and CDATA are kept as they are.