XSD Validator

Check an XML document against an XSD schema: elements and their order, required attributes, data types, enumerations, patterns and lengths.

Processed on your device. Files are not uploaded

How to validate XML against an XSD

  1. Paste your XML document

    Paste or type your XML document into the box, or press Try an example.

  2. Paste the schema

    Put the XSD in the second box.

  3. Read the problems

    Each one gives the path to the element and what is wrong.

When to use XSD Validator

A partner's system, bank or government portal rejects your XML and gives you their XSD.

You produce XML from code and want to check a sample against the schema before shipping.

Tips for a better XSD Validator result

Start with the first problem listed: an early missing element often causes several later errors in the same parent.

Paste the schema exactly as provided, including types defined at the top, since elements often refer to them by name.

XSD Validator: limits and what to check

Schemas split over several files with import or include are not followed, so merge them into one schema first.

Identity constraints such as key, keyref and unique are not checked, so duplicate ids can still pass.

About XSD Validator

Check an XML file against its XSD schema before sending it to a system that will reject it. Elements are checked for order and count in sequences, choices and all groups, attributes for presence and type, and values against built-in types and restrictions such as enumerations, patterns, lengths and ranges.

FAQs

Which parts of XSD are supported?

Elements and references, complex and simple types, sequence, choice, all and groups, extension, attributes and attribute groups, lists, unions and the common facets.

Are namespaces checked?

Names are matched without their prefix, which suits most single-namespace schemas. Imports of other schema files are not followed.

Is this enough for production?

It catches most mistakes. For full XSD 1.0 rules, also validate with xmllint or your platform's validator.

Related tools