Skip to content
hateitall

XML Validator

Find the unclosed tag or stray ampersand that makes a feed, sitemap or config file fail to load.

Processed locallyIn: XML, SVG, RSSOut: Report

Loading tool…

How to use xml validator

  1. Paste XML or open a file. The sample has two mistakes to find.

  2. Read the error: line, column, the line itself and a hint.

  3. Fix it and the check reruns as you type.

  4. When it passes, review the counts of elements, attributes, depth and namespaces.

What this tool does

  • Uses the XML parser built into your browser, the same one that loads XML files.
  • Explains common errors: mismatched tags, a bare &, unquoted attributes, HTML entities such as  , and text after the root.
  • Reports root element, element and attribute counts, depth, namespaces, comments and CDATA.
  • Notes a missing XML declaration or a declared encoding other than UTF-8.

How the result is verified

The verdict comes straight from the browser's XML parser; the summary is counted from the document it built.

Frequently asked questions

Why does   fail?

XML only defines &, <, >, " and '. HTML names like   must be written as numbers, such as  , unless a DTD defines them.

What is the difference between well-formed and valid?

Well-formed means the syntax is correct: tags close, attributes are quoted, there is one root. Valid also means it follows a schema. This tool checks the first.

Is my data uploaded to a server?

No. Everything you drop, paste or type is processed by code running in this browser tab. You can check it yourself: open your browser's developer tools, watch the Network panel, and use the tool. No request carries your data.

Pretty print or minify XML, checked by re-parsing

XML · SVG · RSS→ XMLLight on device

Find JSON syntax errors with the exact line and column

JSON→ ReportLight on device