An XML validator checks your XML document for well-formedness — correct syntax, proper tag nesting, balanced elements, and valid structure. Paste XML below to get an instant VALID/INVALID verdict with specific error locations, document statistics, and an element tree view for valid documents.

XML Well-Formedness Rules
  • Single root element required
  • All tags must be properly closed: <tag></tag> or <tag/>
  • Tags must be properly nested (no overlapping)
  • Attribute values must be quoted
  • Tag names are case-sensitive
  • Special characters must be escaped: &amp; &lt; &gt; &quot; &apos;
  • Comments: <!-- comment --> (no double dashes inside)
  • No attributes with the same name on one element