Validate XML against XSD

Check whether an XML document conforms to its schema. Validation runs entirely in your browser — your files are never uploaded to a server.

Your files stay on your computer

Most online validators upload your document to their server. That is a problem when the file is a real invoice, a patient record, or a contract — the exact documents that tend to need schema validation.

This page works differently. It runs libxml2 compiled to WebAssembly, directly in your browser tab. Nothing is transmitted. You can confirm this yourself: open your browser's network panel, validate a document, and observe that no request carries your data. You can also disconnect from the network entirely after the page has loaded — validation still works.

Multiple schema files

Schemas often split across files using xs:import and xs:include. Use Open file… on the schema pane and select all of them at once. The first file selected is treated as the entry point; the rest are made available under their own file names so that relative schemaLocation references resolve.

Common validation errors, in plain language

No matching global declaration available for the validation root
The root element of your XML is not declared as a top-level xs:element in the schema — or its namespace does not match. This is almost always a namespace mismatch rather than a missing declaration. Compare the xmlns on your root element with targetNamespace in the schema.
This element is not expected. Expected is ( … )
The element exists in the schema, but not at this position. xs:sequence requires the exact declared order; use xs:all if order should not matter.
'…' is not a valid value of the atomic type '…'
A type mismatch. Frequent causes: a decimal written with a comma instead of a point, a date that is not YYYY-MM-DD, or leading and trailing whitespace in a numeric field.
Element '…': Missing child element(s). Expected is ( … )
A required child is absent. Note that an element with minOccurs="0" is optional, but one with only nillable="true" is not — the latter still has to be present, just with xsi:nil="true".
Failed to locate the main schema resource
An imported or included schema file was not supplied. Select every .xsd file the schema references, not just the entry point.

Frequently asked questions

Is there a file size limit?
No fixed limit, but everything happens in your browser tab, so very large documents are bounded by available memory. Files up to a few tens of megabytes are typically fine.
Does it support XSD 1.1?
No. libxml2 implements XSD 1.0. Constructs such as xs:assert and conditional type assignment are not supported. Everything in XSD 1.0 — the vast majority of schemas in practical use — works.
Can I validate against a DTD or RELAX NG instead?
Not currently. This page validates XML against XSD schemas only.
Do you log the documents I validate?
Your documents never reach any server, so there is nothing to log. The site counts two things and nothing else: how often a page is opened, and how often a validation finishes. Both are plain counters on this same domain — no third-party script, no cookie, no identifier, nothing that could be traced back to you. To tell a repeat visit from a first one, your browser stores a single yes, with no identifier attached to it.