XML Formatter

Indent a one-line SOAP response, sitemap or config file. The XML is checked for well-formedness first.

Input · drop a file

Output

Well-formed XML in one minute

  • Exactly one root element.
  • Every opening tag has a matching closing tag (or is self-closing, <br/>).
  • Tags nest properly and names are case-sensitive.
  • Attribute values are quoted, and & and < in text are escaped.

This tool uses your browser’s built-in XML parser, so its verdict matches what browsers and most XML libraries will accept. It does not validate against an XSD or DTD.

Questions

Are comments and CDATA preserved?

Yes. Comments, CDATA sections and processing instructions are kept in place.

Can it format HTML?

HTML is not always well-formed XML. Use the HTML formatter for web pages.

Related tools