XML Validator
Validate XML for well-formedness. Detects unclosed tags, mismatched elements, invalid attributes, and structural issues. Uses your browser's native DOMParser — no upload, no extra libraries.
Valid vs invalid XML
Every open tag needs a matching close. Attributes must be quoted. Reserved characters must be escaped. The validator reports the first failure.
<root> <item id="1">one</item> <item id="2">two</item> </root>
<root> <item id="1">one</item> <item id="2">two </root>
What you'll use this for
SOAP, RSS, Atom feeds, configuration files, document interchange — anywhere XML is the wire format.
RSS / Atom feeds
Confirm a feed is well-formed before publishing or subscribing.
Config files
Validate pom.xml, web.config, build descriptors before commit.
SOAP envelopes
Catch broken envelopes before sending to a legacy service.
Sitemaps
Validate sitemap.xml before submitting to search engines.
How to validate XML
Paste your XML
Drop it into the left editor. CodeMirror highlights tags, attributes, and entities.
Click Validate
Or leave auto-validate on for live feedback. DOMParser runs locally — no server.
Read the report
If well-formed you'll see a tick. If not you'll see the parsererror text from the browser plus a snippet around the failure.
Fix and re-run
Close that tag or quote that attribute, re-validate. Auto-validate keeps the report fresh while you type.
Frequently asked questions
No — only well-formedness (does the XML parse). For schema validation against an XML Schema Definition, use a dedicated XSD validator.
Yes — the underlying DOMParser is namespace-aware. xmlns declarations and prefixed elements parse correctly.
Yes. No signup, no limits, no ads.
No. Parsing runs entirely with the browser's native DOMParser. Your data never leaves your device.
This tool checks well-formedness only (tags balanced, attributes quoted, characters escaped). It can't tell whether your XML satisfies a business rule — that requires schema or domain-specific validation.
About this validator
XML is verbose but strict: every open tag needs a close, every attribute needs quotes, every < or & in text needs escaping. This validator uses the browser's native DOMParser — the same engine SAX, XSLT, and most XML libraries call out to under the hood.
What it checks
- Tag balance — every
<tag>has a matching</tag>or is self-closing (<tag/>). - Attribute quoting — attribute values must be enclosed in single or double quotes.
- Character escaping —
&,<,>in text must use entities. - Single root — well-formed XML has exactly one root element.
- Namespaces —
xmlnsdeclarations and prefixed elements are recognized.
What it doesn't do
- XSD / DTD validation. Schema-aware validation is not part of well-formedness — use a dedicated XSD validator.
- Semantic checks. A well-formed XML doc may still fail your business rules.
- Pretty-print. Use the XML formatter for that.