XML Validator

Check whether an XML document is well-formed and see the line that broke. Validation runs in your browser, so the file is never uploaded.

XML input

Paste your XML

Validation result

Result

Paste XML and press Validate to check it.

What does an XML validator do?

An XML validator parses the document and reports whether it is well-formed: every start tag has a matching end tag, attributes are quoted, and elements are nested correctly.

Well-formedness is the first requirement before XML can be read by a parser, an XSLT sheet or a SOAP client. Schema validation is a separate, stricter step.

How to validate XML

  1. Paste your XML into the input box.
  2. Press Validate XML.
  3. A green message confirms the document is well-formed.
  4. Otherwise the error shows the line and the mismatched tag.

XML validation examples

Well-formed

<note><to>Ada</to></note>
Well-formed

Missing end tag

<note><to>Ada</to>
Not well-formed — unclosed tag note

XML validator: UrsaKit vs other options

CriterionUrsaKitRolling your ownTypical online tool
SetupOpen the pageInstall xmllintOpen the page
Error positionLine and messageLine and messageVaries
Data leaves the deviceNo, runs in the browserNoOften sent to a server
Schema supportNo, well-formedness onlyDTD and XSDSometimes
FAQ

Frequently asked questions

Well-formed or valid — what is the difference?

Well-formed means the syntax is correct. Valid means it also matches a DTD or XSD schema. This tool checks well-formedness.

What errors are reported?

Unclosed tags, mismatched end tags, unquoted attributes and other syntax problems, with the line number.

Does it check namespaces?

It accepts namespace declarations as attributes; it does not validate that each prefix is bound to the expected URI.

Is my XML uploaded?

No. Validation runs locally in JavaScript in your browser.

Can it validate huge files?

Files up to a few megabytes are fine; very large documents depend on your device's memory.

Should I validate before formatting?

Validating first is a good habit: a formatter will also fail on broken XML, but the validator explains exactly why.

All Tools