XSD Validator
Validate XML against an XSD, a RELAX NG schema or a DTD with libxml2 compiled to WebAssembly — the engine behind xmllint — each violation reported by its line.
Parsed and validated with libxml2 (WebAssembly), the same engine behind real XML tooling — not a hand-rolled regex checker.
Validate XML against an XSD schema
Paste an XML document and an XSD (XML Schema Definition), and this tool checks the document against the schema, listing every rule it breaks — a missing required element, elements out of order, a value that violates a datatype such as xs:positiveInteger or xs:date, or a missing required attribute. Each violation is reported with the line number where libxml2 found it, so you know exactly where to fix it. libxml2’s own message is kept as written, and under it the common XSD failures are explained in plain words — a value of the wrong type, elements out of order or not declared there, a namespace mismatch, a missing child element or attribute, an attribute or root element the schema does not declare, a value outside an enumeration or pattern — while a message it does not recognise is left without a guess. Leave the schema box empty and Validate checks only that the document is well-formed XML, and says so: “Well-formed — no schema was given, so only the XML syntax was checked”. The Schema language select also validates against RELAX NG in its XML syntax or against a DTD, reported the same way; RELAX NG’s compact syntax is not read.
Enterprise and SOAP schemas, no Java toolchain
Validation is powered by libxml2 compiled to WebAssembly — the same engine behind xmllint --schema — so it understands the complex types, namespaces and datatype facets that enterprise and SOAP schemas rely on. A schema split across files works too: pick every file of the set at once with “Open a multi-file schema…”, the one no other file refers to goes in the box, and the rest answer its xs:include and xs:import references by file name, so schemaLocation="common/types.xsd" finds the types.xsd you picked. Everything runs in your browser: your schema and document never leave your device, and you need no local xmllint, XSD library, or Java/.NET toolchain installed.
Frequently asked questions
Which XSD versions are supported?
XML Schema 1.0, via the libxml2 engine (the same one xmllint uses). It handles complex types, sequences, namespaces and datatype facets. Besides XSD, the Schema language select validates against RELAX NG (XML syntax) or a DTD.
Why is each violation shown with a line number?
libxml2 records where it found each problem, so every message starts with its line ("Line N: …"), adds the column when libxml2 gives one (it does for XML syntax errors, not for schema violations), and names the file when the problem is in another file of a multi-file schema. Beside a message about one of the two boxes, Go to line N selects that line in that box, so you land on the offending element or attribute.
How do I validate against a schema split into several files?
Press Open a multi-file schema… and pick every file of the set at once. The file that no other file includes or imports goes in the schema box and the rest are listed under it; each include or import is answered by file name, so a schemaLocation of common/types.xsd finds the types.xsd you picked, whatever folder it came from. The files are handed to libxml2 for that validation only, and Remove those files takes them away. RELAX NG’s include and externalRef are answered the same way.
Can I check a document without a schema, or read the errors in plain words?
Yes, both. Leave the schema box empty and Validate checks only that the XML is well-formed; a pass reads “Well-formed — no schema was given, so only the XML syntax was checked”, never a claim that the document fits a schema. Against a schema, each libxml2 message stays as written, and under the common ones — a value of the wrong type, elements out of order, a namespace mismatch, a missing child or attribute, an enumeration or a pattern — a sentence says which rule it means, in the page's language. A message it does not recognise gets no explanation rather than a guess.
Can I save the list of violations, to put in a ticket?
Yes. Above the list of violations, Copy puts the whole list on the clipboard and Download saves it as xsd-validator-issues.txt — one violation to a line, in libxml2’s own words with its line number, exactly as listed on the page. The plain-word explanations under the common ones stay on the page and are not part of the file.