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.
How to use
- Paste XML into the input.
- Read the result: the root element, counts, and size for valid input, or the parser message for invalid input.
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.
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.
Related tools
- XML Formatter Re-indent XML with consistent spacing and readable nesting, keeping the declaration, DOCTY...
- XML to JSON Convert XML into JSON with attributes, text content, and repeated child elements mapped to...
- HTML Formatter Re-indent HTML with consistent indentation and one tag per line, while keeping script, sty...