Browser-local validator

XML Validator

Check that an XML document is well formed, with the line and column of the first problem and a plain explanation of it.

XML Validator

Processed in this browser
Paste XML
Ready to copy

How to use it

A short path from source data to a usable local result.

01

Add XML

Paste or upload a document, including one written on a single line.

02

Run the check

The browser XML parser reads it and stops at the first well-formedness error.

03

Read the report

A pass names the root element and the size of the tree; a failure names the problem and how to fix it.

Common questions

Details that matter when moving data between formats.

Is this schema validation?

No. It checks well-formedness: tags close in the right order, attribute values are quoted, an attribute name appears once per element, and every ampersand starts a valid entity. A DTD or an XSD is not applied, so an element in the wrong place still passes.

Why does an undefined entity fail?

Browsers do not fetch an external DTD, so an entity declared only inside a DTD file has no definition and the parser reports it. Write the character itself, or a numeric reference such as ©.

What counts as a duplicate attribute?

Two attributes with the same name on one element. The report names the attribute and the line, because XML does not allow the repeat even when both values are identical.

Does the document leave my device?

No. The parser runs in this tab and the file is never uploaded.

Related tools

Other focused converters that are already available.

When is XML Validator useful?

An XML validator is the tool to open when a feed, a SOAP response, or a configuration file is rejected and the error message names a line that looks correct. This page checks well-formedness: every start tag has a matching end tag in the right order, attribute values are quoted, an attribute name appears once per element, and every ampersand starts a valid entity. The document goes to the parser built into the browser, so the verdict matches what that browser would do with the same file. Nothing is uploaded and the parse happens in the tab.

The failure report is written in plain words rather than the parser's own wording. A mismatched closing tag names both tags, so an element opened as item and closed as items is reported that way instead of as a generic error. An element that is never closed is reported with the tag still open when the document ends. A repeated attribute is reported with the attribute name. An ampersand that is not part of an entity, a less-than sign inside an attribute value, a comment that is never closed, and a second root element each get their own message, and every one of them carries the line and the column where the parser stopped.

What this page does not do is schema validation. A DTD or an XSD is neither fetched nor applied, so an element in the wrong place, a missing required attribute, or a value of the wrong type still passes as long as the markup is well formed. External entities are not resolved either, because browsers do not load an external DTD, so an entity that exists only in a DTD file arrives undefined and is reported as such. A document of several megabytes is parsed in one pass and can pause the tab for a moment. Once a document is well formed, the XML Formatter indents it and the XML to CSV tool flattens repeated records into a table.