XML / XSD Validator
Check that your XML is well-formed, with an optional XSD schema to check element names. Works with files up to 200MB.
How to use this tool
Paste or upload the XML and click Validate. If it isn't well-formed, you get the line and column where the browser's parser stopped, plus its own message. To also check element names, paste or upload an XSD in the second box; every element used in the XML must be declared somewhere in it.
What the error messages mean
Chrome and Edge word the error differently from Firefox, but they point at the same spot. These are the mistakes that break real files most often, with both messages as this page shows them:
| In the XML | Chrome / Edge | Firefox | Fix |
|---|---|---|---|
Tom & Jerry | xmlParseEntityRef: no name | not well-formed | Write & |
qty < 6 | StartTag: invalid element name | not well-formed | Write < |
499 | Entity 'nbsp' not defined | undefined entity | Use  ; XML only knows five named entities |
<g:price> with no xmlns:g | Namespace prefix g on price is not defined | prefix not bound to a namespace | Declare the prefix on the root element |
Two <order> elements at the top | Extra content at the end of the document | junk after document element | Wrap them in one root element |
<Item>…</item> | Opening and ending tag mismatch | mismatched tag. Expected: </Item> | Tag names are case-sensitive |
A blank line before <?xml …?> | XML declaration allowed only at the start of the document | XML or text declaration not at start of entity | Delete everything before it |
A missing closing tag is reported where the parser finds the wrong one, not where the tag was left open. In a catalogue where line 4 reads <book> instead of </book>, the error lands on line 5 at </catalog>. Chrome's message names both, "book line 4 and catalog", which tells you where to look.
What the XSD check covers
It collects every name declared on an <xs:element> in the schema and lists any element in your XML that isn't among them, ignoring namespace prefixes. That catches a misspelled or invented element such as <prise>. It doesn't check attributes, element order, how many times an element appears, or whether a value such as <price>abc</price> matches its declared type. Those need a full schema validator such as xmllint --schema, which is what a feed or API that rejects your file is usually running.
Frequently Asked Questions
Which named entities can XML use without a DTD?
Only five: & < > " and '. Everything HTML adds, such as , © or ’, is an error in XML unless a DTD defines it. Write the character itself (the file is UTF-8 by default) or a numeric reference:   for a non-breaking space, © for ©, ₹ for ₹.
Why does a Google Shopping or RSS feed fail on the first g: or media: tag?
Those prefixes have to be declared before they are used, normally on the root element: xmlns:g="http://base.google.com/ns/1.0" for Google Merchant feeds, or xmlns:media="http://search.yahoo.com/mrss/" for Media RSS. Without the declaration the file isn't well-formed, so every parser rejects it, not just this one.
My XML passed here but failed in another tool — why?
That other tool is very likely doing full schema validation — checking data types, attribute constraints, element ordering, and occurrence counts — which this tool intentionally doesn't attempt client-side. A pass here confirms your XML is syntactically correct and, if you supplied an XSD, uses only declared element names; it isn't a guarantee of full schema conformance.
Related Tools
Related Blog Posts
Converting CSV and XML to Excel Without Losing Data
Why double-clicking a CSV mangles PIN codes, long IDs and ₹ signs, what a careful CSV-to-Excel conversion does instead, and how XML records map to spreadsheet columns.
Read moreHow to Convert JSON to Excel, CSV, XML and YAML (and Back)
What actually happens to your data when JSON becomes a spreadsheet, XML, or YAML: missing keys, nested values, leading zeros, and the XML array problem, with real converter output.
Read moreHow to Flatten Nested JSON and Convert JSONL Files
How dot-notation flattening turns nested objects and arrays into spreadsheet columns, what survives the trip back, and how JSON Lines differs from a normal JSON file.
Read more