How This XML Lint Tool Works
Paste XML and this xml lint tool instantly lists every issue it finds, no signup, no schema to configure, a genuine xml linter free to use for any document size. As a tool to check xml for errors online, it walks through the document tag by tag, tracking which elements are still open, and doubles as an xml error line number finder, reporting each problem with the exact line and column it occurred on, so you can jump straight to the broken spot instead of scanning the whole document by eye.
Tag Matching, Self-Closing Elements, and Root Structure
As a genuine xml tag mismatch checker, it catches a closing tag that doesn't match the most recently opened element, a closing tag with no open tag left to match, and any tag left open at the end of the document. It also correctly recognizes self-closing tags for any element name, not just the fixed set of HTML void tags like img and br, since XML lets any element self-close, unlike HTML. Finally, it enforces one of XML's most basic well-formedness rules as part of this validate xml structure online check: a document must have exactly one top-level root element, a stray second top-level element is flagged as an error even if every individual tag is otherwise correctly closed.
Attribute and Entity Checks
As a genuine xml attribute validator and xml attribute quote checker, it flags an attribute quote that's opened but never closed, and separately flags an attribute written without a value at all (allowed loosely in HTML, but invalid in strict XML). As an xml unescaped character checker, it also catches a bare & that isn't part of a valid entity reference like & or ©, since XML requires ampersands to be escaped in element text and attribute values. Comments, CDATA sections, and DOCTYPE declarations are recognized and excluded from this check, since their content isn't parsed as XML markup and never needs entity escaping.
What This Tool Doesn't Check (and Why)
This xml document error checker validates well-formedness, that the document follows XML's own structural rules, plus a handful of common real-world mistakes. It does not validate against a specific schema, DTD, or XSD, so it won't catch a document that's syntactically well-formed XML but violates a particular format's required elements, attributes, or data types. Use it as a fast first pass to catch structural errors before reaching for a schema-aware validator when you need to confirm compliance with a specific XML vocabulary.