Developer tool

XML formatter and validator

Make XML readable with clean indentation, check it's well-formed, or minify it.

Advertisement
Result

Advertisement

How to format XML

  1. Paste your XML, open a file, or drop one onto the box. SVG, XSD, WSDL and .config files work too.
  2. The indented result appears on the right as you type.
  3. If something is wrong, such as a tag that isn't closed, you'll see the line and column. Press Format / validate to jump there.
What does "well-formed" mean?

Every tag is closed, tags are nested properly, there is exactly one root element, attribute values are in quotes, and special characters like & are written as &.

Does it check my XML against a schema (XSD)?

No. It checks that the XML is well-formed, not that it follows a particular schema.

Are comments and CDATA kept?

Yes. Comments, CDATA sections, processing instructions and the <?xml ?> declaration are kept.

Advertisement