# Validate XML against XSD.
Find the mismatch.

Source: https://xsdhub.com/xsd-validator

Check XML against an XSD 1.0 schema online. Find missing fields, wrong element order and invalid data types, privately in your browser. Free to use.

## What XSD validation adds

XML Schema Definition, or XSD, describes the structure a class of XML documents is expected to follow. A schema can require an attribute, restrict an element to a number, define the order of children and limit how many times an item appears. Well-formed XML can still fail its schema: <quantity>two</quantity> is valid XML syntax but fails when quantity is defined as xs:positiveInteger.

## How to validate XML against a schema

Open or paste your XML in the left editor and your XSD in the right editor. Keep XML + XSD selected, then run Validate XML. Use the exact schema version required by the system receiving the document. Start with the included order example; the invalid example deliberately puts text in numeric fields so you can see the resulting diagnostics.

## Namespaces and order matter

An element called order in a namespace is different from an order element with no namespace. Compare the XML namespace with the schema targetNamespace before renaming elements. For xs:sequence, child elements must also appear in the declared order. Missing child element errors can therefore point to either an absent field or an unexpected field appearing too early.

## What this beta supports

XSDHub uses the libxml2 validation engine and supports XSD 1.0 schemas, including local imports and includes. Load XSD files, a folder or a ZIP and choose the main schema. Projects support up to 100 schemas and 10 MB total. Optional server modes support XSD 1.1 and ISO Schematron with XPath 1.0 after upload consent. DTDs and implicit remote fetching are blocked. Public HTTPS schemas can be imported explicitly as a snapshot. A passing result confirms conformance to the supplied schema; it does not certify compliance with external business, tax or industry rules. Inputs must be UTF-8: XML allows 10 MB and each schema allows 1 MB.
