Why use this XSD validator?
How to validate an XSD schema online
Step 1 — Select your main XSD file
Click the first file picker and choose the root XSD schema (the file that contains your top-level element declarations). This is typically named something like root.xsd, schema.xsd, or types.xsd.
Step 2 — Upload included schemas
If your main XSD uses xs:include or xs:import, select all referenced files in the second file picker. Hold Ctrl (Windows/Linux) or Cmd (Mac) to select multiple files. The filenames must match the schemaLocation values in your XSD exactly.
Step 3 — Optionally add an XML file
To check whether an XML document conforms to your schema, upload it in the third field. You can validate XML and XSD simultaneously in a single request.
Step 4 — Choose a mode and click Validate
Select XSD only to check the schema itself, XML only to validate a document against an already-known-good schema, or Both for a complete check. Results appear below the form with clickable error details.
Frequently asked questions
-
An XSD (XML Schema Definition) file defines the structure, data types, and constraints for XML documents. It specifies which elements and attributes are allowed, their order, cardinality, and value restrictions. XSD is the W3C standard for XML schema validation and is widely used in enterprise data exchange, web services (SOAP/WSDL), and configuration formats.
-
Both are used to split a schema across multiple files. xs:include incorporates another XSD that belongs to the same target namespace, effectively merging the two schemas. xs:import references an XSD from a different (or no) namespace. This validator supports both — just upload all referenced files together.
-
PHP's built-in DOMDocument class provides a schemaValidate() method. Load your XML with $dom->load($path), then call $dom->schemaValidate($xsdPath). Enable libxml_use_internal_errors(true) first so errors are captured rather than printed. This is exactly how this tool works under the hood.
-
This error occurs when libxml cannot find a file referenced by xs:include or xs:import. The schemaLocation must match the actual filename exactly, including case. If you upload all files to the same directory, relative paths like schemaLocation="types.xsd" will resolve correctly. Absolute URLs or paths to remote files are not supported in this tool.
-
Yes. Every upload is stored in an isolated temporary directory named with 16 random hex characters. Files are deleted immediately at the end of the request using PHP's finally block, regardless of whether validation succeeds or throws an exception. No file content is ever logged or stored.
-
This validator uses PHP's libxml2 library, which supports XSD 1.0 (the W3C XML Schema 1.0 specification). XSD 1.1 features such as xs:assert and xs:override are not supported by libxml2.