What it does
Paste an XML document and its XSD schema and see whether the document conforms. Validation uses libxml2, the same library behind the xmllint command-line tool, compiled to WebAssembly and running in a background worker in your browser.
Features
- Every error, with its line: wrong data types (
'0' is not a valid value of the atomic type 'xs:positiveInteger'), unexpected or missing elements, enumeration and pattern violations, missing required attributes. Click an error to jump to that line in the editor, or copy the whole list. - Well-formedness first: if the XML or the schema itself is broken, you get the line and column from the browser’s XML parser before validation is attempted.
- Broken schemas are reported, for example a type reference that doesn’t resolve, with the line in the XSD.
- Multi-file schemas: use Add schema files to load the files referenced by
xs:includeorxs:import(by their file names). - Validate as you type, or turn it off and press Validate (Ctrl+Enter) for large documents.
How to use it
Paste or drop the XML on the left and the XSD on the right. The example shows a purchase order with four kinds of mistakes so you can see what the error list looks like.
Privacy
The validation engine (about 800 KB, from the open-source xmllint-wasm package) is downloaded from cdn.jsdelivr.net the first time you validate and then cached by your browser. Your XML and XSD are processed locally and never uploaded; the last inputs are kept in local storage.