XML Formatter
Validate, beautify and minify XML — with clear error messages.
Runs in your browser — your data never leaves your device.
About the XML Formatter
Make XML readable — sitemaps, RSS feeds, SOAP responses, Android layouts or config files — or squeeze it into one line. The XML is checked with your browser's own parser, so problems such as unclosed tags or bad characters are reported clearly.
How to use the XML Formatter
- Paste your XML.
- Click Beautify (choose 2 spaces, 4 spaces or tabs) or Minify.
- Copy the result or download it.
How it works
The text is parsed with DOMParser as application/xml. If it is well-formed, elements, attributes, text, CDATA, comments and processing instructions are written back with indentation (or none, for minify). Elements that contain only text stay on one line.
Examples
<a><b>1</b></a>→ beautified on three lines with the<b>indented.<a><b></a>→ ✗ error: mismatched tag.
Frequently asked questions
Is my data sent to your server?
No. Everything runs in your browser, on your own device. Nothing you type, paste or choose is uploaded or stored.
Does it validate against an XSD schema?
No. It checks that the XML is well-formed (correct syntax), not that it follows a particular schema.