XML Validator
Check XML well-formedness and get the exact line and column of the first error.
Conversion payloads stay in this browser tab and are never placed in page URLs - see how local processing works. Privacy-safe analytics record only the tool, outcome, and a coarse input-size bucket. Press Cmd/Ctrl + Enter to convert.
How to Validate XML
Paste or upload an XML document and the validator reports the first well-formedness error with its line and column, or confirms the document parses and summarizes its root element, element count, nesting depth, and comment count. Fix the reported location, revalidate, and repeat - errors are reported one at a time because a single unclosed tag usually cascades into dozens of misleading follow-on errors.
Errors This Catches
The most common causes of an XML parse failure.
| Input | Output | Note |
|---|---|---|
| <a><b></a> | Mismatched end tag | b is never closed |
| <a x=1> | Unquoted attribute value | Needs x="1" |
| <a>Tom & Jerry</a> | Invalid entity | Use & |
| <a/><b/> | Multiple roots | One root element only |
| <a x="1" x="2"/> | Duplicate attribute | Names must be unique |
Frequently Asked Questions
What does this validator actually check?
Well-formedness: every element is closed, end tags match start tags, attributes are quoted and not duplicated, entities and character references are syntactically valid, and there is exactly one root element. Errors report the line and column where parsing failed.
Does it validate against an XSD or DTD?
No, and the report says so explicitly. Schema validation needs your schema file and answers a different question - whether the document has the right elements in the right order with the right data types. This tool answers whether the XML can be parsed at all, which is the failure you hit first.
Why does my document fail on an ampersand?
A bare & starts an entity reference in XML. Literal ampersands must be written &, and the same applies to < as <. Copying a URL with query parameters straight into element text is the most common cause of this error.
Is anything sent to a server?
No. The parser runs locally in this browser tab, so configuration files and API payloads you are debugging never leave your machine.
Related Tools
XML Formatter
Indent and beautify XML without rewriting your document - comments, CDATA, and attribute order are preserved.
XML to JSON Converter
Convert XML to JSON instantly with our free online tool.
JSON Validator
Check whether JSON is valid, find the syntax error, and see what the document contains.