← All tools
/ to focus
// XML / Developer

XML Validator online

Validate XML for well-formedness — line & column errors, stats, namespace detection

Chunky Munster XML mascot
by
CHUNKY
MUNSTER
// TRY AN EXAMPLE
// XML input ● live
// paste or type XML above to validate

The XML Validator checks your XML for well-formedness — meaning it has a single root element, all tags are properly closed and correctly nested, attributes are quoted, and special characters are escaped. Errors are reported with exact line and column numbers so you can jump straight to the problem. Related tools: XML Formatter, XML Minifier, JSON Validator, XML to JSON.

What Does the XML Validator Check?

Well-formedness is the foundational requirement for any XML document. The validator uses the browser's built-in XML parser (the same engine that powers every web browser's XML processing) to check for:

Well-Formed vs Valid XML — What's the Difference?

These terms are often confused. Well-formed means the document follows the core XML syntax rules above — it can be parsed by any XML parser without error. Valid means it additionally conforms to a specific schema, either a DTD (Document Type Definition) or an XSD (XML Schema Definition), which describes what elements and attributes are allowed and in what structure. This tool checks well-formedness, which must always pass before schema validation is even attempted. If your XML is not well-formed, no parser can process it regardless of schema.

Common XML Errors and How to Fix Them

// Frequently Asked Questions

What does the XML Validator check?

It checks whether your XML is well-formed — single root element, all tags properly closed and nested, attributes quoted, special characters escaped, and no syntax errors. Every error is reported with its exact line and column number so you know exactly where to look.

Is the XML Validator free to use?

Yes — completely free with no account required, no usage limits, and no data sent to any server. All validation runs locally in your browser.

Is it safe to validate sensitive XML here?

Yes. All processing happens locally in your browser using JavaScript and the built-in DOMParser. Nothing is transmitted to a server, making it completely safe for configuration files, API responses, tokens, and private data.

What is the difference between well-formed and valid XML?

Well-formed XML follows the basic XML syntax rules. Valid XML also conforms to a DTD or XSD schema that defines what elements and attributes are allowed. This tool checks well-formedness, which is the foundational requirement every XML document must meet before any further processing.

Can this validator check XML schemas (XSD)?

Not directly — XSD validation requires a schema definition file and a validating parser. This tool checks well-formedness, which is always the first step. If your XML passes here, you can then use a dedicated schema validator with your XSD file for full conformance checking.

What are XML namespaces and why do they matter?

Namespaces let you combine XML vocabularies from different sources without naming conflicts — for example, mixing XHTML and SVG. The validator detects namespace declarations (xmlns:prefix) and lists them. Every namespace prefix you use must be declared in scope, or the XML is not well-formed.