Skip to content
Jellykit

XML Validator

Check that XML is well-formed and see the exact line and column of the first error, with the line shown.

  • Runs on your device
Loading tool

About XML Validator

When a feed, a sitemap or a config file is rejected with a vague parse error, paste it here or drop the file. You get a clear verdict: either the document is well-formed, with a count of its elements, attributes and nesting, or the first problem is named in plain words with its line, its column and the surrounding lines marked with a caret.

The check follows the XML 1.0 well-formedness rules. It does not validate against a DTD or an XSD schema, and it says so in the result.

How it works

  1. The text is read once, start to finish, by a checker that applies the XML 1.0 rules: exactly one root element, tags closed in the right order, legal names, quoted and unique attributes, and valid entity and character references.
  2. It stops at the first problem, because everything after a broken tag is guesswork, and shows that line with the two before it.
  3. Entities declared in the document’s own DOCTYPE are recognised. When the DOCTYPE points to an external DTD, unknown entities are accepted and the result says they were not checked.
  4. Columns count characters, so accented letters and emoji earlier on the line do not throw the position off.

Questions

What is the difference between well-formed and valid?

Well-formed means the document follows the syntax of XML itself, which every parser requires. Valid means it also matches a particular DTD or XSD schema, such as the one for sitemaps. This tool checks the first; it does not check against a schema.

Why does it only show one error?

After the first well-formedness error a parser cannot know what the rest of the document was meant to be, so later errors are often side effects of the first. Fix it and check again.

Is my file uploaded?

No. The file is read and checked by code running in this browser tab. Nothing is sent anywhere.

Which files can it read?

Text up to 5 MB, typed, pasted or dropped. Files are read as UTF-8, which covers almost all XML in use; a file in another encoding may show odd characters but its structure is still checked.

Everything you enter here is processed in this browser tab. Nothing is uploaded, logged or shared. How privacy works here.