✓ XML Validator

Check XML syntax with detailed error reporting. Detects unclosed tags, malformed entities, encoding issues, and structure problems — all in your browser, no upload.

About the XML Validator

This XML validator runs entirely in your browser using the native DOM parser. Paste your XML and click Validate to check it for well-formedness. The parser detects unclosed or mismatched tags, malformed entities (such as & errors), encoding problems, duplicate attributes, and missing root elements. When an error is found, the message includes the line and column so you can jump straight to the issue.

Well-formed vs. valid XML

Well-formed XML follows the syntax rules of XML: a single root element, properly nested and closed tags, quoted attribute values, and correct entity usage. This validator checks well-formedness. "Valid" XML additionally conforms to a DTD or XML Schema — that requires a schema and is beyond this tool's scope.

How to use the validator

  1. Paste your XML into the input box.
  2. Click Validate.
  3. Read the result panel — well-formed documents report success; problems list the error with line and column numbers.
  4. Fix the issues in your editor and re-validate.

Frequently asked questions

Does it support DTD or XSD validation? No. This tool checks XML well-formedness (syntax). Schema-based validation requires loading external DTD/XSD files which is not supported here.

Why does XML require a single root element? An XML document must have exactly one top-level element that contains everything else. Multiple roots at the top level make the document not well-formed.

Is my XML uploaded? No. All validation happens locally in your browser.