🔧 Programming
✅ 100% Free
⚡ Instant
XML Validator
Validate XML documents for well-formedness. Get clear error messages, element and attribute statistics, and structure analysis — all in the browser.
Input
Output
Ready — paste your input and click Format
Try a sample:
Valid XML
Invalid XML
Complex XML
What is XML Validation?
XML validation checks that a document is well-formed — meaning it follows the core XML syntax rules. Well-formed XML has a single root element, all tags are properly closed and nested, attribute values are quoted, and special characters are escaped. This tool validates well-formedness using the browser's native XML parser.
Common XML Errors
- Unclosed tags — every
<tag>needs a matching</tag> - Case mismatch —
<Item>and<item>are different tags - Unquoted or missing attribute values — must be
id="value" - Unescaped special characters — & must be written as &
Frequently Asked Questions
Well-formed XML follows the basic XML syntax rules (proper nesting, quoted attributes, single root, escaped special chars). Valid XML additionally conforms to a specific schema (DTD or XSD). This tool checks well-formedness using the browser's DOMParser.
The most subtle issues are: using & instead of & in text, mismatched case in opening/closing tags, or extra content after the root element. Even one character out of place can break an XML document.
Schema validation requires a server-side processor. For XSD or DTD validation, tools like XMLSpy, oXygen, or the xmllint command-line tool support this. This tool validates well-formedness only.
Done!