XML/XSD Validator
Free XML validator: check that XML is well-formed and valid against an XSD, with a line number for each error. Runs in your browser.
XML document
Stays in your browserOptional XSD schema
Stays in your browserShortcuts: Ctrl+Enter run · Ctrl+Shift+C copy result · / search (use ⌘ on Mac)
Online XML and XSD Validator
Check XML structure, optionally compare required elements against an XSD, and receive clear client-side validation feedback. Use this XML validator to check a document against an XSD and read each error with its line number. It gives integration developers a quick XML schema checker for feeds, SOAP payloads, and configuration documents before deployment.
What this validator checks and who uses it
XML well-formedness checks syntax and nesting — balanced tags, valid attributes, one root element. Adding an XSD goes further by comparing the document against a schema's required elements. Two concrete uses: an integration developer confirming a SOAP or feed response is well-formed before parsing it further, and a developer double-checking that a hand-edited config or data file still contains every element a downstream system expects.
Worked example
With the default XSD requiring <name> and <email>, validating <user><name>Ada</name></user> (email removed) reports two lines: XML is well-formed. and Missing required element: <email>. The XML itself is syntactically fine — it's only the schema comparison that catches the missing field.
Common mistakes and edge cases
- The XSD check only confirms an element with the right tag name exists somewhere in the document (via
getElementsByTagName) — it does not check element order, nesting depth, or which parent it's under. Reordered or misnested elements with correct tag names still pass. - There's no type checking — an
<age>element containing the text"not a number"satisfies a required-element check just as well as one containing30. - Only elements without
minOccurs="0"are treated as required; complex type restrictions, imports, and custom validators in the XSD are not evaluated at all.