XML Formatter and Validator

Beautify, minify and validate XML. Errors show the exact line. More data tools

Format and validate XML

Paste XML to check it is well-formed and rewrite it with neat indentation, or minify it. Mismatched tags, a missing root element and unescaped & characters are reported with the line and column and an explanation.

CDATA, comments, processing instructions and the XML declaration are preserved.

Features

  • Live: the result updates while you type.
  • Clear errors: the line, the reason and, where possible, a one-click fix.
  • Open and drop files, copy or download the result, and share your input as a link.
  • Send to another tool: pass the result straight to a related tool.
  • Private: Everything runs in your browser. Your data is not uploaded to any server.

Related data tools

Frequently asked questions

Does it validate against a schema?

No. It checks that the XML is well-formed, not that it matches an XSD.

Can it minify XML?

Yes. Choose Minify to remove indentation and, if you wish, comments.

Is my data private?

Everything runs in your browser. Your data is not uploaded to any server. You can even use the tool offline once the page has loaded.