Input
Ready
Lines: 0
Words: 0
Chars: 0
Size: 0 KB
Input statistics are available via the Stats button above this field.
Output
Lines: 0
Words: 0
Chars: 0
Size: 0 KB
Output statistics are available via the Stats button above this field.
Results are provided for informational purposes only and may contain errors. Please verify important information independently. Use of this tool is at your own risk.
What the XML Validator does
The XML Validator checks whether your document is well-formed: every tag is closed, tags are nested in the right order, attribute values are quoted, special characters are escaped and there is exactly one root element.
When something is wrong it reports the first error with its line number and a suggested fix. It checks syntax, not a schema: it does not validate against an XSD or DTD, so a well-formed document can still miss fields your system requires.
When to use it
- An import or API call fails with a vague XML parsing error and you need to find the line.
- Checking a hand-edited sitemap, RSS feed, Android layout or Maven pom.xml before deploying it.
- Confirming that XML generated by your code is well-formed before converting it with the XML to JSON Converter.
- Locating a broken tag in a large file quickly, instead of reading thousands of lines by eye.
Worked example
Input
<note>
<to>Ana</to>
<from>Ben</note>
Output
Expected closing tag 'from' (opened in line 3, col 3) instead of closing tag 'note'. (Line 3)
Suggestion: Make sure every tag is closed, attribute values are quoted, and the document has exactly one root element.Common questions about the XML Validator
How do I run the check?
Paste the XML into the input box and click Check & Suggest Fix. A valid document is confirmed; otherwise you see the error message, its line and a suggestion.
Why is an ampersand an error?
In XML, & starts an entity reference, so a bare & in text or an attribute breaks the document. Write it as &, and use < for a literal < character.
Does it validate against an XSD schema?
No. It checks well-formedness, which every XML document must pass. Schema rules such as required elements or data types need a schema-aware validator in your build or IDE.
Is this tool free?
Yes, it's free to use. No signup, no email required. Get results on this page.
How do I get my result?
Use the tool on this page. Your result appears here; no email delivery is required.