XML Validator
Check if your XML is well-formed. Get error details with line and column numbers, plus document statistics.
XML Validator
Check if your XML is well-formed. Reports errors with line and column numbers, plus document statistics including element count, max depth, and attribute count.
5
Elements
0
Attributes
1
Max Depth
0
Comments
What is XML validation?
XML validation checks whether a document is well-formed — meaning it follows the basic syntax rules of XML: every tag is closed, attributes are quoted, special characters are escaped, and there is exactly one root element. A well-formedness check catches structural errors before the document reaches a parser, an API consumer, or a production system.
This validator runs entirely in your browser using the built-in DOM parser. Paste your XML and get an instant verdict — no data is uploaded or stored.
What it checks
- Unclosed or mismatched tags and invalid nesting
- Unescaped special characters such as &, <, and >
- Duplicate attributes on the same element
- Multiple root elements or content outside the root
- Error location reported with line and column numbers
- Document statistics: element count, attribute count, and maximum depth
When to use it
Use the validator when an integration rejects your XML payload, when hand-editing configuration files, or when you need a quick sanity check on SVG, RSS, XSD, WSDL, or sitemap documents before deploying them.
Frequently asked questions
What does "well-formed" XML mean?
The document follows XML's basic syntax rules: every element is closed, attributes are quoted, special characters are escaped, nesting is correct, and there is exactly one root element. Well-formed is the minimum every XML parser requires.
What is the difference between well-formed and valid XML?
Well-formed means syntactically correct. Valid means it also conforms to a schema (XSD or DTD) that defines which elements and attributes are allowed. This tool checks well-formedness; use the XSD Validator tab for schema validation.
Which errors does the validator catch?
Unclosed or mismatched tags, bad nesting, unescaped & < > characters, duplicate attributes, multiple root elements, and content outside the root — each reported with line and column numbers.
Is my XML uploaded or stored?
No — validation uses the browser's built-in DOM parser locally. Nothing is sent to a server, which makes it safe for configs containing internal endpoints or credentials.
