XML Formatter, Validator & Converter

Format or validate XML, minify it, or convert between XML and JSON.

XML and JSON are parsed entirely in this browser. No document contents are uploaded or sent to another service.

DOCTYPE declarations are deliberately rejected. This tool does not fetch external schemas, DTDs, or entities, and well-formed XML is not necessarily valid against your application's schema.

Well-formed XML

Formatted XML

<catalog source="local">
  
  
  <item id="1">Alpha</item>
  
  
  <item id="2">Beta</item>
  

</catalog>

Conversion convention

XML attributes use keys prefixed with @, text mixed with attributes uses #text, and repeated child elements become JSON arrays. JSON → XML requires exactly one top-level root key.

Related Tools