Valid XML
<note>
<to>Bob</to>
<from>Alice</from>
<body>Hello!</body>
</note>The XML Validator checks whether a document is well-formed XML and reports errors with line information so you can fix them quickly. It verifies the rules that make XML well-formed: a single root element, properly nested and closed tags, quoted attribute values, and correctly escaped special characters. XML (Extensible Markup Language) is a self-describing, tag-based format used for configuration, SOAP and RSS feeds, document formats, and data exchange across many systems.
Validation runs entirely in your browser using the native parser, so your XML is never uploaded or stored on a server. Paste a document to instantly learn whether it is well-formed or get a message pointing at the offending line, such as a mismatched closing tag or an unescaped ampersand. This is ideal for debugging hand-edited config, checking a feed, or confirming generated XML parses cleanly before another system consumes it.
The main file is the entry point for each run.
Use the Input panel to pipe standard input to your program when it needs data.
Run sends your code to a fresh hosted runtime and streams the result into the output panel.
Your draft stays in this browser, and Share creates a separate snapshot link.
<note>
<to>Bob</to>
<from>Alice</from>
<body>Hello!</body>
</note><note>
<to>Bob</from>
</note>
<!-- Error: closing tag </from> does not match <to> --><item>Tom & Jerry</item>
<!-- Error: '&' must be escaped as & --><a>1</a>
<b>2</b>
<!-- Error: document must have exactly one root element --><config version="1.0">
<item id="1" enabled="true"/>
<item id="2" enabled="false"/>
</config>
<!-- Valid: quoted attributes and empty self-closing elements --><a href=page.html>link</a>
<!-- Error: attribute values must be quoted, e.g. href="page.html" --><?xml version="1.0" encoding="UTF-8"?>
<doc>
<!-- a comment -->
<code><![CDATA[ if (a < b && b > c) {} ]]></code>
</doc>
<!-- Valid: CDATA lets < and & appear literally --><root xmlns:h="http://example.com/html">
<h:table>
<h:tr><h:td>cell</h:td></h:tr>
</h:table>
</root>
<!-- Valid: 'h' prefix is bound by the xmlns:h declaration --><b><i>text</b></i>
<!-- Error: tags must nest; close </i> before </b> -->The editor uses Monaco, the engine behind VS Code, with language-aware editing tools and familiar keyboard controls.
Paste an XML document into the validator
The native browser parser checks it for well-formedness
On failure it points at the offending line
A single root element with properly nested, closed tags
Quoted attribute values
Correctly escaped special characters like ampersands
Validation runs entirely in your browser using the native parser
Your XML is never uploaded or stored on a server
Debugging hand-edited config or RSS/SOAP feeds
Confirming generated XML parses cleanly before another system reads it
No input to validate