XML Formatter
Pretty-print or minify XML and catch tags that don't match.
How it works
- 1Paste your XML.
- 2Choose indentation or minify.
- 3Copy or download the result.
Features
- 2 or 4 space indentation, or minified.
- Short elements stay on one line.
- Comments, CDATA and declarations kept.
- Mismatched and unclosed tags reported with the line.
Frequently asked questions
Does it validate against a schema?
No. It checks that the XML is well-formed (every tag closed and nested correctly), not that it matches an XSD.
Is whitespace inside text changed?
Leading and trailing whitespace of text nodes is trimmed for formatting.
Is my data sent anywhere?
No. Everything runs in your browser; nothing is uploaded.