XML Validator

Check that XML is well-formed and see the element, attribute, and depth counts, with the parser message and position when the document is broken.

An XML validator parses a document with a strict XML parser. It reports the parser message when the markup is not well-formed, and element, attribute, and depth counts when it is.

Output

                

Paste or type something above.

Questions about xml validator

Why is my valid-looking XML rejected?
XML is stricter than HTML. Tags have to close, attributes need quotes, a single root element is required, and entity references must be declared.
Does it accept HTML?
No. HTML has rules XML does not, such as optional closing tags and unquoted attribute values. Use HTML Formatter for markup that is not well-formed XML.
What counts as depth?
The root element is depth 1, and each nested element adds one.