About XML Validator
Check whether XML is well-formed and find the exact place where it is not. The checker reports the first error with its line and column, for example a closing tag that does not match, an unescaped ampersand, an attribute without quotes or a second root element. When the document is fine you get a short summary: root element, number of elements and attributes, nesting depth and comments.
How to use XML Validator
- Paste your XML or open a file.
- Read the result: a green summary or the first error with line and column.
- Fix that problem in your source and paste again.
- Repeat until the document is well-formed.
Tips and good to know
- Only the first error is shown, because later errors are often a result of the first.
- Characters such as & and < in text must be written as & and <.
- Undeclared namespace prefixes are shown as a note rather than an error.
Well-formed vs valid
A well-formed XML document follows the syntax rules: one root, closed and properly nested tags, quoted attributes. A valid document also follows a schema (DTD or XSD) describing which elements and attributes are allowed. Checking well-formedness catches most errors in hand-edited files, feeds and sitemaps.
Well-formed versus valid
XML has two levels of correctness. Well-formed XML follows the basic syntax rules: one root element, properly nested and closed tags, quoted attributes and escaped special characters. Valid XML is also well-formed and matches a schema (an XSD or DTD) that defines which elements and attributes are allowed.
The most common errors are an unescaped ampersand (write &), a closing tag that does not match because of different capitalisation, and text or a second element outside the root.
Frequently asked questions
Is well-formed the same as valid?
No. Well-formed means the syntax is correct. Valid means it also follows a schema such as an XSD, which this tool does not check.
Is my XML uploaded?
No. The check runs in your browser.
Is XML Validator free?
Yes. XML Validator is 100% free: no sign-up, no paid plan, no trial and no limit on how often you use it. It runs in your browser, and ToolzAura is paid for by ads, so every tool stays free.
Are my files uploaded?
No. This tool runs in your browser, so your input stays on your device.