DevToolCase
Sign in Sign in

Format and validate XML

Indent XML and find the exact line of an error: unclosed tag, wrong closing tag, unescaped “&”…; minify it in one click.

Share this result

Encrypted in your browser. The key stays in the link, after “#”: only the people you give it to can read it, not even DevToolCase.

The link works for

Sign in for longer links or links without expiry, and to find them in your account.

Runs entirely in your browser: nothing you type is sent or stored.

What does an XML formatter do?

XML from a SOAP web service, an export or a configuration file often arrives on a single line. Formatting puts each element on its own line, indented by depth, so that the tree of the document shows. It also checks that the XML is well-formed, and points to the first error.

The most common XML errors

  • A tag that is never closed: <item> without </item>.
  • Tags closed in the wrong order: <a><b></a></b>.
  • An unescaped character in text: write &amp; for & and &lt; for <.
  • Several root elements: an XML document has exactly one.
  • A difference of case: <Item> and </item> are two different tags.

Well-formed is not valid

Comments, CDATA sections, the XML declaration and the DOCTYPE are kept. A well-formed document follows the XML syntax; checking that it follows its schema (XSD) is another step, done by the application that receives it.

To send XML, minify it. For EDI messages, the EDIFACT converter writes an interchange as XML.

Add this browser’s favorites to your account?

This browser has 0 favorites that your account does not have:

Either way, this browser keeps its favorites: you find them again after signing out.