XML Schema Validator
Validate XML documents against an XSD schema with structural checks.
$xml data
0 chars1 lines
$xsd schema
0 chars1 lines
Paste an XML document and an XSD schema above to validate
Note: validates required elements, basic type checks (string, integer, decimal, boolean, date), and unexpected elements. Full XSD 1.1 spec not implemented.
Related Tools
FAQ
- What does this validator check?
- The validator checks: well-formedness of the XML (proper nesting, closed tags), presence of required elements declared in the XSD, element types (xs:string, xs:integer, xs:boolean, xs:date), and basic sequence constraints. Complex XSD features like xs:choice groups and xs:any wildcards are not fully supported.
- Why not full XSD validation in the browser?
- A fully compliant XSD validator is a substantial piece of software (hundreds of kilobytes) and XSD 1.1 support is even rarer. This tool implements the structural checks that cover the vast majority of practical XML validation use cases without requiring a server round-trip or large library.
- What is the difference between well-formed and valid XML?
- Well-formed XML follows basic XML syntax rules: proper nesting, closed tags, quoted attributes, and a single root element. Valid XML is additionally well-formed AND conforms to a specific schema (DTD, XSD, or RelaxNG). A document can be well-formed but not valid.
Paste an XML document and an XSD schema to perform structural validation. Checks that required elements are present, element types match schema declarations, and the document hierarchy follows the defined sequence. Since full XSD validation in the browser is complex, this tool performs practical structural checks covering the most common validation scenarios.