XML Validator

Validate XML and locate every error

Check XML well-formedness in real time. Mismatched tags, unclosed elements, and unescaped characters are flagged at the exact line and column — all processed privately in your browser.

Ready — paste or type to validate

🔒 100% private — your document is processed entirely in your browser and is never uploaded, logged, or stored.

Find the broken tag in seconds

When an XML document won’t parse, the cause is usually a single misplaced character.Indentio reports the exact line and column, names the problem — a mismatched closing tag, an unescaped ampersand, a duplicate attribute — and, where it’s safe, offers a one-click fix.

The well-formedness rules, in full

XML has no “mostly correct” state. A document either satisfies every rule below and parses, or it fails one and is rejected entirely — there is no error recovery of the kind browsers apply to broken HTML. These are the constraints this validator enforces:

RuleInvalidValid
Exactly one root element<a/><b/><r><a/><b/></r>
Every element is closed<p>text<p>text</p> or <p/>
Elements nest, never overlap<a><b></a></b><a><b></b></a>
Names match exactly, including case<Item>…</item><item>…</item>
Attribute values are quoted<a id=1/><a id="1"/>
Attribute names are unique per element<a x="1" x="2"/><a x="1" y="2"/>
& and < are escaped in text<u>a&b</u><u>a&amp;b</u>
Element names start with a letter or underscore<2nd><_2nd>
Nothing precedes the XML declaration <?xml … ?><?xml … ?> at byte 0
Comments contain no --<!-- a -- b --><!-- a - b -->

Namespaces, and why an undeclared prefix fails

A colon in a tag name — <xs:element>, <soap:Envelope>,<dc:creator> — marks a namespace prefix. The prefix is only a local shorthand; it must be bound to a URI by an xmlns: declaration on that element or an ancestor:

<!-- ✗ prefix "xs" was never declared -->
<xs:schema>
  <xs:element name="title"/>
</xs:schema>

<!-- ✓ -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="title"/>
</xs:schema>

This is the single most common failure when someone copies a fragment out of a WSDL, an XSD, or an Atom feed and validates it on its own: the declaration lived on the root element that was left behind. The URI itself is just an identifier and is never fetched — it does not need to resolve to anything, and typing it wrong produces no error here, only a mismatch later against a schema.

Well-formed, valid, and the three schema languages

This validator answers the first question. It is worth knowing precisely what the second one would add:

All three assume a well-formed document to begin with. If a schema validator reports a cryptic parse failure, run the document through a well-formedness check first — a surprising share of “schema errors” turn out to be a missing tag.

A note on DOCTYPE and external entities

A DTD can define custom entities, and an entity can point at an external file or URL. Server-side XML parsers that resolve those references have been the source of a long-running class of security problems known as XXE — a document that quietly reads /etc/passwd and exfiltrates it. Indentio parses in your own browser with entity resolution off, so nothing is fetched and there is nothing to leak. If you accept XML from users in your own systems, disable external entity resolution in whichever parser you use; it is off by default in most modern libraries and dangerously on in some older ones.

Works with any XML dialect

SVG, RSS, Atom, XSD, WSDL, sitemaps, Maven pom.xml, Android layouts, .NET.config, Apple .plist, DocBook, XLIFF, and SOAP envelopes are all XML, so all of them validate here. Upload a file or paste the markup directly. Two dialect habits cause most real-world failures: unescaped ampersands in URLs inside feeds and sitemaps, and namespace prefixes separated from their declaration.

Validate, then fix

Go deeper

Frequently asked questions

How do I validate XML online?

Paste your XML into the editor. Well-formedness is checked as you type, and any error is underlined in red at its exact line and column with an explanation.

What is “well-formed” XML?

Well-formed XML has exactly one root element, every tag properly closed and nested, special characters escaped (&amp;, &lt;, &gt;), and no duplicate attributes. This validator enforces all of those rules.

Does it validate against a DTD or XSD schema?

Not yet — it checks well-formedness, which is what most people need. Schema (DTD/XSD) validation is on the roadmap.

Why does it report an error on a line that looks fine?

Because a parser reports where it could no longer continue, not where you made the mistake. A tag left unclosed on line 40 is only detectable when something else closes in the wrong order, or when the document ends. Read the reported line as “by here, something was already wrong” and check the enclosing element in the tree view.

Are XML tag names case-sensitive?

Yes, strictly. <Item> and <item> are different elements, so <Item>text</item> is a mismatched-tag error. HTML is forgiving about this; XML never is.

Is my XML kept private?

Yes. Everything runs locally in your browser; your XML is never uploaded or stored.