XML Validator

Check whether XML is well-formed and see the error line and column. Does not validate against DTD or XSD and never resolves external entities.

Input

Up to 5 MiB. The file is not uploaded: it is read in your browser.

Ctrl + Enter to run

Result

The XML validator checks that the document is well-formed: one root element, tags closed in order, quoted and unique attributes, escaped “&”, valid comments and declared namespace prefixes. When something fails it shows the line and column.

How to use it

  1. Paste the XML.
  2. Press Run.
  3. Use “Go to error” to jump to the reported position.

Example

Example input
<order id="42">
  <item sku="A-1">Teclado</item>
  <item sku="B-2">Ratón</items>
</order>
Result
Error (line 3, column 24): Closing tag </items> does not match <item>.

Limitations

  • No DTD or XSD validation: well-formed XML may still violate your application’s schema.
  • Documents with a DOCTYPE are rejected for security.

FAQ

What is the difference between “well-formed” and “valid”?
Well-formed means it follows XML syntax. Valid also means it matches a schema (DTD or XSD), which this tool does not check.
Are schemas or namespaces downloaded?
No. Namespace URIs are just identifiers and the tool makes no requests.

Related tools

References