XML Validator
Check that XML is well-formed — every tag closed, attributes quoted, a single root element — and see the line where it fails. Nothing is uploaded; runs in your browser.
Suggested tools
About XML Validator
XML Validator checks that XML is well-formed: every opening tag has a matching closing tag, elements are properly nested, attribute values are quoted, special characters are escaped and there is exactly one root element. When something is wrong, it shows the error and the line it is on.
Use it before sending a SOAP request, uploading a sitemap or feed, or committing a config file. Everything runs locally in your browser — the text you paste is never uploaded.
How to use XML Validator
- Paste XML or upload an .xml file.
- Press Validate.
- Fix the reported line and validate again.
Key features
- Well-formedness check with line numbers
- Detects unclosed and mismatched tags
- Detects unescaped & and < characters
- Works with sitemaps, RSS, SOAP and config files
Example
The <item> element is never closed.
<order> <id>5</id> <item>Pen </order>
Invalid XML: Expected closing tag 'item' (opened in line 3, col 3) instead of closing tag 'order'. (line 4)
When to use XML Validator
- Checking a sitemap before submitting it to Google Search Console.
- Validating an RSS feed or SOAP message before publishing or sending it.
- Finding the broken tag in a long XML config file.
Tips and common problems
- An error message names the tag that was opened but not closed — look just above the reported line.
- Escape & as & and < as < in text.
- There must be exactly one root element wrapping everything.
Frequently asked questions
No. It checks that the XML is well-formed. Validation against a schema (which elements are allowed where) needs the schema file and a schema validator.
That the document follows XML's basic syntax rules, so any XML parser can read it. A file that is not well-formed is rejected by every XML tool.
In XML, & starts an entity. Write it as & — XML Escape does this for you.