XML validation is a routine step before sending data to SOAP endpoints, importing configuration files, submitting feeds to Google Merchant or Apple AppStore, or processing any XML pipeline. This validator uses the browser's built-in DOMParser — the same engine that processes web pages — to check well-formedness and report the first error with precise location information.
Unclosed element: <name>Alice without </name>. Mismatched tags: <b><i>...</b></i>. Unescaped special characters: bare & or < in text content. Multiple root elements: XML allows exactly one root element. Invalid XML declaration: must be first, no whitespace before <?xml. Unquoted attribute values: <item id=5> (must be id="5").
encoding="UTF-8")Well-formed XML follows the XML 1.0 structural rules (correct nesting, closed tags, quoted attributes, etc.). Valid XML additionally conforms to a specific schema (DTD or XSD) that defines which elements and attributes are permitted. This tool checks well-formedness only.
Not in this tool — XSD validation requires schema processing not available in browsers' built-in parsers. For XSD validation, use tools like XMLSpy, Oxygen XML, the Java JAXB validator, or the online W3C XML Validator.
A BOM (byte order mark) before the XML declaration, a whitespace character before <?xml, or an incorrect encoding declaration can all cause parsing to fail on the first line even though the visible text looks fine. Check for hidden characters.
A CDATA section (<![CDATA[content]]>) wraps text that should be treated as character data, not markup. Characters like < and & inside CDATA do not need escaping. CDATA is often used for embedding HTML or script code within XML elements.
See also the XML Formatter, XML to JSON, and the JSON Formatter.