XML Schema Validator (XSD)

Validate XML documents against XSD schemas. Check element structure, required attributes, and data types.

Common XSD Data Types
xs:stringAny text
xs:integerWhole numbers only
xs:decimalNumbers with decimals
xs:booleantrue / false
xs:dateYYYY-MM-DD format
xs:dateTimeYYYY-MM-DDThh:mm:ss

What is XML Schema Validator (XSD)?

This tool validates XML documents against XSD (XML Schema Definition) schemas. It checks that element names, attributes, data types, and document structure all conform to the rules defined in your XSD schema.

How to Use

  1. Paste your XSD schema in the left panel (or click "Example Valid" to load a sample)
  2. Paste your XML document in the right panel
  3. Click "Validate" to check the XML against the schema
  4. Errors are shown with element paths so you can find exactly what is wrong
  5. Fix the XML (or XSD) and re-validate

Why Use This Tool?

Browser-based — no server upload, your data stays private
Shows element path for every error (e.g., /bookstore/book[2]/price)
Validates required attributes, missing elements, and data types
Detects unexpected elements not defined in the schema
Supports xs:integer, xs:decimal, xs:boolean, xs:date, xs:string, and more
Works with any well-formed XSD schema

Tips & Best Practices

  • The XSD must be a valid XML document itself — run it through an XML validator first if unsure
  • Data types like xs:integer reject decimal values like "12.5" — use xs:decimal for decimals
  • use="required" on xs:attribute means the attribute must appear in every element
  • maxOccurs="unbounded" allows any number of repeated child elements
  • minOccurs="0" makes an element optional
  • Browser XSD validation is structural — for full XSD 1.1 feature support, use a dedicated library