Skip to content
{}

XML Validator

Check XML well-formedness and get the exact line and column of the first error.

0 chars | 1 lines
0 chars | 0 lines

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.

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.

InputOutputNote
<a><b></a>Mismatched end tagb is never closed
<a x=1>Unquoted attribute valueNeeds x="1"
<a>Tom & Jerry</a>Invalid entityUse &amp;
<a/><b/>Multiple rootsOne root element only
<a x="1" x="2"/>Duplicate attributeNames 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 &amp;, and the same applies to < as &lt;. 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