XML Validator
Validate XML syntax and well-formedness.
Check whether XML is well formed: every tag closed and correctly nested, attribute values quoted, one root element, and special characters like & and < escaped. Paste XML and you'll either get a confirmation with the root element and the number of elements, or the parser's error describing what's wrong and where. It uses your browser's own XML parser, the same strict one that loads feeds and SVG files. It doesn't check XML against a DTD or an XSD schema.
Common use cases
- Find why a feed, sitemap or config file won't load
- Check XML produced by a script or export
- Validate an SVG or Android resource file
- Check an API request body before sending it
How to use
- Paste the XML, or press Try an example to see an error.
- Read the result: well formed, or the error message.
- Fix the problem, then format it with the XML formatter if you like.
FAQ
What's the difference between well formed and valid?
Well formed means it follows XML's syntax rules. Valid means it also matches a schema (DTD or XSD) listing which elements are allowed, which this tool doesn't check.
Why is & an error?
In XML, & starts an entity, so a literal ampersand must be written &. The same goes for < as <.
Is my XML uploaded?
No. It's parsed in your browser.
Related tools
- XML FormatterFormat and indent XML documents for better readability.
- JSON ValidatorValidate JSON syntax and structure.
- HTML ValidatorValidate HTML markup and structure.
- CSV ValidatorValidate CSV file structure and data consistency.
- Email ValidatorValidate email address format and structure.
- Domain ValidatorValidate domain name format and structure.