Tested tool guide
Tested browser tools
Checked August 16, 2026
What XML Validator & Formatter does, with a checked example
This tool parses an XML document the way a strict XML reader would, checks it against the well-formedness rules of the XML 1.0 specification, and re-emits it with uniform indentation at a width you choose, in spaces or tabs. Paste a document and the result is either a formatted copy or an error naming the line and column of the first violation. The surprise most users hit: 'well-formed' is not the same as 'valid'. This tool checks syntax only. It cannot tell you whether your document conforms to a DTD or XSD schema, which is what schema-validating systems often mean by 'valid XML'.
Worked example
A concrete input and expected output from the current implementation.
Input
<library><book id="1"><title>XML in Action</title><author>Doe</author></book><book id="2"><title>Data on the Web</title></book></library>
->
Expected output
<library>
<book id="1">
<title>XML in Action</title>
<author>Doe</author>
</book>
<book id="2">
<title>Data on the Web</title>
</book>
</library> The document is well-formed, so the tool re-emits it: each nesting level adds two spaces of indent, and elements containing only other elements are split across lines. A malformed document such as <note>10 & 20</note> would instead return an error pointing at the '&', which must be written as & in XML.