XSD Schema Validator
Validate an XML document against an XSD schema. Reports structural, cardinality, attribute, and type errors with element paths.
XSD Schema Validator
Validate an XML document against an XSD schema — element structure, cardinality, required attributes, and simple-type restrictions (enumerations, patterns, lengths, ranges). Supports common XSD 1.0 constructs (sequence, choice, all, named and inline types). Everything runs in your browser.
What is XSD validation?
Well-formed XML is only half the story — XSD (XML Schema Definition) validation checks whether a document conforms to a declared structure: which elements must appear, in what order, how many times, which attributes are required, and whether values match declared types like integers, dates, or enumerations.
Paste your schema on the left and the document on the right. Validation runs entirely in your browser — nothing is uploaded.
What it checks
- Root element matches a global xs:element declaration
- Element structure per xs:sequence, xs:choice, and xs:all
- Cardinality: minOccurs and maxOccurs on element declarations
- Required attributes (use="required") and undeclared attributes
- Built-in xs: types — string, integer, decimal, boolean, date, dateTime, and more
- Simple-type restrictions: enumeration, pattern, min/maxLength, min/maxInclusive
- Named and inline xs:complexType and xs:simpleType definitions
Scope and limitations
This validator covers the commonly used XSD 1.0 constructs: elements, attributes, sequences, choices, type references, and simple-type facets. Advanced features like xs:group, attributeGroup, identity constraints (xs:key/xs:unique), substitution groups, and xsi:type polymorphism are not evaluated. For production validation of complex schemas, use a full XSD engine such as xmllint or Xerces — this tool is built for quick development and debugging checks.
When to use it
Use it when an API rejects your XML payload with a schema error, when testing whether a generated document matches a contract schema, or when learning how XSD declarations map to document requirements. For plain well-formedness checks (no schema), use the XML Validator instead.
