Skip to content
SDETRole
SDETRole

JSON & Data

XML Validator

Check XML is well-formed and see the error line and column.

Runs entirely in your browser No sign-up

Input XML

0 chars

About this tool

A malformed XML payload usually fails deep inside a SOAP client or parser with an unhelpful stack trace. This validator parses the document with the browser’s native XML parser and reports the first well-formedness error, with line and column when the browser provides them: unclosed or mismatched tags, an unescaped & or <, duplicate attributes, or more than one root element. When the document is valid it shows the root element and the element count.

How to use it

  1. Paste the XML, or load the broken sample to see what an error looks like.
  2. Read the banner: green means well-formed, red gives the parser’s message and location.
  3. Fix the reported spot (the real mistake is often just before it) and the check re-runs as you type.

XML Validator FAQ

Is this XSD or DTD validation?

No. It checks well-formedness: the syntax rules every XML document must follow. Validating against an XSD (for example a SOAP contract) needs a schema-aware validator in your test framework, such as javax.xml.validation in Java or xmllint with --schema.

Why does the error message differ between browsers?

The check uses the browser’s built-in parser, and Chrome, Firefox and Safari word their errors differently. The location is extracted from whichever format your browser uses; if it does not report one, only the message is shown.

How do I include & or < in text?

Escape them as &amp; and &lt;, or wrap the text in a CDATA section. An unescaped & is the most common cause of “not well-formed” errors in hand-edited test fixtures.

Type to search across SDETRole.

Full-text search by Pagefind · runs in your browser Open search page →