XML Mismatched Tag Error Example: Wrong Closing Tag
Check that XML is well-formed: prolog version, matched tags, and closed quotes.
🔒 Processed entirely in your browser — nothing you enter here is ever uploaded.
The result appears on this page after you run the tool. Nothing you enter is uploaded.
Result
About this tool
This page opens the XML validator preloaded with a short note document that contains a real, common mistake: the <message> element is closed with </date> instead of </message>, most likely a copy-paste slip from editing a nearby field. The failing check below runs live the moment the page loads and reports both where the mismatched tag was found and where the tag it should have closed was originally opened.
A mismatched closing tag is one of the most common ways real-world XML breaks, especially in documents edited by hand or generated by string concatenation rather than a proper serializer: every other tag in the file can be perfectly formed, and a single wrong closing tag anywhere still invalidates the whole document, because XML requires a strict, well-nested tree with no exceptions.
Replace the sample with your own XML to see the same tag-matching check applied to it, including line numbers for both the mismatch and the original opening tag. Compare it against the xml-document-example preset to see the same shape of document with every tag correctly closed and passing cleanly.
Example. <note>hi</note> is accepted. <note>hi is reported as an unclosed note tag. A note start tag closed by </item> is a mismatched tag.
Limit. The parser checks well-formedness. It does not validate against an XSD or DTD, and tag names are compared with their original case.