XSD Validator

Free online XSD schema validator — with xs:include & xs:import support

Upload your main XSD and all included XSD files together. The validator places them in the same temporary directory so xs:include and xs:import references are resolved automatically by filename. Max 2 MB per file · Max 10 includes · Files are deleted immediately after validation.
Validations remaining this hour 20 / 20
📂 Upload files
Validation mode

Why use this XSD validator?

🔗
xs:include & xs:import
Upload all your XSD files at once. Include chains are resolved automatically by filename — no server-side configuration needed.
📍
Exact error locations
Every error shows the precise line number, column, severity level, and the file it originates from — including included schemas.
🔒
Privacy first
Files are stored in an isolated temp directory and deleted immediately after validation. Nothing is logged or retained.
⚡
Two-phase XSD check
First checks XML well-formedness, then compiles the schema to catch structural errors like undefined types and bad restrictions.
🆓
Free, no sign-up
No account, no email, no credit card. Open the page and validate — up to 20 times per hour.
🌐
Works everywhere
Runs in any modern browser. No Java plugin, no browser extension, no software installation required.

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.