XML Validator
Paste XML, SVG, RSS, a SOAP envelope or a sitemap to check that it is well-formed. Each error names the tag and the line and column where it happened.
How it works
Well-formed XML (W3C XML 1.0) has exactly one root element, every start tag closed by a matching end tag, properly nested elements, quoted attribute values and no duplicate attributes on one element.
This checks well-formedness. Validation against a DTD or XSD (which elements are allowed where) is a separate step that needs the schema file.
Everything above runs in JavaScript inside this tab. Your data is not uploaded. Inputs are remembered in this browser only so they survive a reload; you can switch that off on the privacy page.
Questions
What is the difference between well-formed and valid XML?
Well-formed means it follows XML syntax rules. Valid means it is well-formed and also conforms to a DTD or XML Schema (XSD). A document can be well-formed but not valid.
Why is "&" an error?
In XML, & starts an entity reference. A literal ampersand must be written as & (and < as <) or placed inside a CDATA section.