XML Formatter, Validator & Minifier

Tidy up XML or squash it, and find the exact spot where it is broken. Everything runs in your browser; nothing you enter is uploaded or stored.

  • Free, no sign-up
  • Runs in your browser
  • Verified

How to use it

  1. Paste your XML.
  2. Choose Format or Minify.
  3. Read the result, or the error with its line and column.

How it works

The text is read tag by tag, respecting quoted attribute values (a > inside a quote does not end a tag), comments, CDATA sections, processing instructions and the XML declaration. Every start tag must have a matching end tag, which is how a mismatch is located. Formatting indents child elements and keeps text-only elements on one line. Minifying removes whitespace between elements.

Examples

  • <a><b></a> reports that </a> does not match <b>, with the position.

Limitations

  • This checks that tags match and are well formed at a basic level. It does not validate against a schema (XSD/DTD), check character references or namespaces, or resolve entities.
  • Whitespace can be significant in XML that mixes text and tags. Formatting or minifying changes it, so do not use these on documents where that matters.

References

Last verified . See our Accuracy & Editorial Policy. Found a problem? Email contact@tools.gift.