Skip to content

XML Validator

Check that XML tags are balanced and correctly nested, and get the line where the structure breaks.

Input

Enter something above to see the result.

Reindenting and checking structure

The formatter reindents elements so nesting is visible, and the minifier strips whitespace and comments back out for transport.

The validator is a structural check: it verifies that every tag is closed and correctly nested and reports the line where that breaks. It does not validate against a DTD or an XSD schema.

Frequently asked questions

Does it validate against a schema?

No. It checks well-formedness — balanced, correctly nested tags — which is what catches the overwhelming majority of hand-edited XML problems.

Are attributes and CDATA preserved?

Yes. Only whitespace between elements is changed; attribute values, CDATA sections and processing instructions are left untouched.

Related tools