XML Validator (Well-Formed Check)

Paste XML, get an immediate well-formedness check. If valid, you see the document statistics (elements, depth, attributes). If invalid, you see the exact line and column where parsing failed, with a snippet of the problem area. Uses the browser's native DOMParser so accuracy matches what your XML-consuming code would see.

How to use the XML Validator (Well-Formed Check)

Paste any XML document. The validator parses with the browser's native DOMParser and reports the first error (if any) with its line and column. The tool checks well-formedness (matched tags, valid characters, proper attribute quoting, etc.) — it does not validate against a schema or DTD. For schema validation, paste your XSD and the doc into a dedicated tool like an XSD validator.

About XML Validator (Well-Formed Check)

"Well-formed" XML follows the basic syntactic rules: every opening tag has a matching close, attributes use balanced quotes, no overlapping elements, valid character data. "Valid" XML additionally conforms to a schema (XSD or DTD) that says what tags and attributes are allowed where. Most XML processing problems start with well-formedness errors — a stray angle bracket in user input, an unescaped ampersand, mismatched casing in tag names.

This validator gives you the same parse result your downstream code would see: the browser's DOMParser is the same library that runs in every web app, and its error positions match what you'd get from libxml or any modern XML parser. The statistics view counts elements, attributes, max depth, total chars — useful for spotting unexpected bloat or sanity-checking a generated document.

Common use cases

  • API response debugging — quickly check whether an XML response is malformed or just unexpected.
  • Hand-written config files — confirm web.xml, pom.xml, Spring configs parse before you ship.
  • RSS / Atom feeds — validate a feed you're publishing before announcing it.
  • SOAP envelope debugging — track down well-formedness issues in custom SOAP payloads.

Frequently asked questions

Does it validate against an XSD?

No — only well-formedness. XSD validation requires a different tool because schemas need to be loaded and applied separately.

Why does it accept un-namespaced elements?

Well-formedness doesn't require namespace declarations. If your downstream consumer requires them, you'll get errors there.

How does it handle entities?

Built-in entities (&, <, etc.) and numeric character references work. External entity declarations (DOCTYPE with SYSTEM) are typically blocked by browsers for security \xE2\x80\x94 if you need DTD validation, use a server-side tool.