Skip to main content

XML Schema (XSD) Validator

Validate XML against an XSD 1.0 schema in your browser

XSD schema

0 B · 0 lines

Additional schema files

For relative xs:include or xs:import locations. Up to 10 files, 5 MB for all schemas.

XML document

0 B · 0 lines

Results

Validate XML against an XSD 1.0 schema
Paste or upload a schema and a document, then select Validate. The validation engine (about 0.8 MB) downloads from this site on first use.

Add an XSD schema and an XML document to validate.

Engine: libxml2 (XSD 1.0) compiled to WebAssembly. XSD 1.1 features such as assertions are not supported.

What the XSD validator checks

XML Schema (XSD) Validator checks whether an XML document conforms to an XSD 1.0 schema, which is a different question from whether the XML is well-formed. It reports results in four phases: parsing the schema, compiling it, parsing the document and validating the document against the schema, so you can see exactly where a problem starts.

How validation runs

Validation uses libxml2, the library behind xmllint, compiled to WebAssembly and run in a Web Worker in your browser. The engine (about 0.8 MB) downloads from this site on first use. Your XML and XSD are never uploaded. Each validation stops after 10 seconds (30 seconds on the first run, which includes the download), and the engine has no network or file access.

Security limits

DOCTYPE declarations with external identifiers and all ENTITY declarations are refused before validation, which blocks XXE and entity expansion attacks. xs:import, xs:include and xs:redefine with http, https, file or absolute paths are disabled; add referenced schemas as local files instead. XInclude is not processed. Documents and schemas are limited to 2 MB each, all schemas together to 5 MB, and the list shows the first 100 diagnostics.

Version support

The validator targets XSD 1.0. XSD 1.1 features such as xs:assert, xs:alternative and open content are not supported and are reported as schema compile errors.

Frequently asked questions
Are my XML and XSD uploaded to a server?
No. Validation runs in a Web Worker in your browser using libxml2 compiled to WebAssembly. Only the engine file is downloaded from this site; your documents are never sent and nothing is stored.
Does the validator support XSD 1.1?
No. The engine is libxml2, which implements XSD 1.0. XSD 1.1 features such as xs:assert and conditional type alternatives are detected and reported as schema compile errors instead of being ignored.
How do I validate a schema that imports other schemas?
Add each referenced file with Add schema file using the same name as its relative schemaLocation, such as types.xsd. Remote URLs and absolute paths are disabled for security, so download those schemas and add them locally.

CodingTool is officially live on