Tested tool guide
Tested browser tools
Checked August 16, 2026
What XML Formatter & Validator does, with a checked example
Paste XML into this tool to check whether it is well-formed, then reformat it with consistent indentation or strip that indentation back out into a compact single line. It parses the document the way any XML parser must: matching every start tag to its end tag in strict nesting order, confirming a single root element, and requiring quoted attribute values. The mistake people hit most often isn't a misspelled tag - it's an unescaped ampersand or a bare angle bracket inside plain text, which XML always reads as the start of markup rather than literal data.
Worked example
A concrete input and expected output from the current implementation.
Input
<root><child>Hello</root></child>
->
Expected output
Not well-formed: mismatched closing tag. <child> was opened after <root>, so it must be closed before </root> appears - the parser expected </child> and found </root> instead.
XML requires elements to nest strictly: whichever tag opened last must close first. Here <root> closes while <child> is still open, which violates that rule regardless of how the tags are spelled.