Skip to main content

XML Validator

Checks XML and XSD syntax & well-formedness · Locates the failing line · No install required

Runs 100% in your browser — your schema never leaves your device
document.xml
result XML

The share link contains your schema — share it only where you'd share the schema itself.

About the XML validator

XML is everywhere — configuration files, RSS and Atom feeds, SOAP payloads, document formats and XSD schemas themselves. This tool checks that an XML document is well-formed: every tag is closed and correctly nested, attributes are quoted, entities are valid, and there is exactly one root element. It uses your browser's native XML parser, so there's nothing to install and nothing is uploaded.

An XSD (XML Schema Definition) is itself an XML document, so you can paste an .xsd here too and check that the schema file is well-formed. When parsing fails, the validator surfaces the parser's error — typically with the location of the problem inside the message — so you can find the mismatched tag or stray character.

Note the scope: this checks well-formedness and syntax of XML and XSD documents. Validating an XML instance against an XSD schema — confirming the document obeys the rules a schema defines — is a separate, heavier feature on the roadmap. In practice many XSD-conformance problems start with malformed XML, so fixing well-formedness first is the right first step. For JSON-based linked data, see the JSON-LD Validator.

XML validation FAQ

What's the difference between well-formed and valid XML?

Well-formed means the document obeys XML's syntax rules — properly closed and nested tags, quoted attributes, a single root element. Valid means it also conforms to a schema (a DTD or XSD) that defines which elements and attributes are allowed. This tool checks well-formedness; schema validation of an instance is a separate feature.

Does it validate XML against an XSD schema?

No. It checks the well-formedness and syntax of XML and XSD documents. Validating an XML instance against an XSD — confirming the document follows the rules the schema defines — is on the roadmap, not yet supported. Many XSD-conformance problems begin with malformed XML, so fix those first.

Can I validate an XSD file?

Yes. An XSD is itself an XML document, so you can paste your .xsd and the validator will check that the schema file is well-formed XML — closed tags, correct nesting, valid entities and a single root.

Are XML namespaces and the XML version declaration checked?

The parser reads the optional <?xml version="1.0"?> declaration and parses namespace-qualified names as part of well-formedness. It does not enforce that every namespace prefix is bound or resolve namespace URIs — that's part of schema-aware validation rather than well-formedness.