XML Validator

Check that XML is well-formed — every tag closed, attributes quoted, a single root element — and see the line where it fails. Nothing is uploaded; runs in your browser.

Suggested tools

JSON Schema Validator

Check JSON against a JSON Schema and list every rule it breaks.

JSON
Open Tool

JSON Validator

Validate JSON and see syntax errors.

JSON
Open Tool

YAML Validator

Validate YAML and see errors.

YAML
Open Tool

JSON5 Validator

Check JSON5 config files and see the exact error position.

JSON5
Open Tool

JSON to XML

Convert JSON into well-formed XML.

JSONXML
Open Tool

XML to JSON

Convert XML into clean JSON.

XMLJSON
Open Tool

About XML Validator

XML Validator checks that XML is well-formed: every opening tag has a matching closing tag, elements are properly nested, attribute values are quoted, special characters are escaped and there is exactly one root element. When something is wrong, it shows the error and the line it is on.

Use it before sending a SOAP request, uploading a sitemap or feed, or committing a config file. Everything runs locally in your browser — the text you paste is never uploaded.

How to use XML Validator

  1. Paste XML or upload an .xml file.
  2. Press Validate.
  3. Fix the reported line and validate again.

Key features

  • Well-formedness check with line numbers
  • Detects unclosed and mismatched tags
  • Detects unescaped & and < characters
  • Works with sitemaps, RSS, SOAP and config files

Example

The <item> element is never closed.

Input
<order>
  <id>5</id>
  <item>Pen
</order>
Result
Invalid XML: Expected closing tag 'item' (opened in line 3, col 3) instead of closing tag 'order'. (line 4)

When to use XML Validator

  • Checking a sitemap before submitting it to Google Search Console.
  • Validating an RSS feed or SOAP message before publishing or sending it.
  • Finding the broken tag in a long XML config file.

Tips and common problems

  • An error message names the tag that was opened but not closed — look just above the reported line.
  • Escape & as &amp; and < as &lt; in text.
  • There must be exactly one root element wrapping everything.

Frequently asked questions

No. It checks that the XML is well-formed. Validation against a schema (which elements are allowed where) needs the schema file and a schema validator.