Paste or upload your XML to check if it is well-formed. Errors are highlighted with line numbers and readable messages.
Before processing XML in your application or submitting it to an API, you need to confirm it is well-formed. This tool checks your XML for syntax errors like unclosed tags, mismatched elements, invalid characters, and missing declarations — giving you clear error messages with line numbers so you can fix issues fast.
Once your XML passes validation, use the XML Formatter to clean up indentation, or convert it to JSON with our XML to JSON Converter. Validating XML sitemaps? Try the dedicated Sitemap Validator which checks sitemap-specific rules. Learn more about XML structure and syntax in our XML tutorial or explore DTD validation rules.
Paste any XML document to validate. For example, this XML has a mismatched closing tag:
<note>
<to>User</to>
<from>Admin</from>
<body>Remember to save your work
</note>The validator reports the exact error and location:
Error on line 4: Opening and ending tag mismatch: body line 4 and noteFor valid XML, the tool confirms success:
✓ This XML is well-formed and valid.