XML Validator
NewValidate XML documents and get detailed error messages with line numbers.
No validation results yet.
Frequently Asked Questions
Does this validate against an XSD or DTD?
No. It checks whether the XML is well-formed in the browser using DOMParser, then reports structural stats like element count, attribute count, and maximum depth.
Why do the element, attribute, and depth counters stay at 0?
Those stats are only calculated after the XML parses successfully. If the document is invalid, the tool resets all three counters to zero.
Can it point me to the exact line that broke?
Usually yes. When the browser parser includes line and column details in parsererror, the tool shows them and echoes the failing line of XML below the message.
Why does it say my XML is valid even though my app still rejects it?
Valid here only means well-formed XML. It does not check schemas, required business fields, duplicate IDs, or app-specific rules.
Can I use this to prettify the XML too?
No. This tool is just a validator and stats viewer; it does not rewrite or format the document.