XML formatter
Format, minify and validate XML. Errors show the first problem the parser finds. Everything runs in your browser.
Runs in your browser
Format XML
Advertisement
What the formatter does
- Format indents nested elements by two spaces, so the structure is easy to read.
- Minify removes indentation and whitespace between elements.
- Validate checks that the XML is well-formed and reports the first error with its message.
Example
<root><item id="1">Alpha</item><item id="2"/></root>
<root>
<item id="1">Alpha</item>
<item id="2"/>
</root>
Questions
No. Formatting, minifying and validation all run in your browser.
Yes. Comments and CDATA sections are kept as they are in the source.
No. Validation checks only that the XML is well-formed. It does not check against an XSD or DTD.