XML Validator
Check if your XML is well-formed and report errors.
$xml
0 chars1 lines
Related Tools
FAQ
- What does "well-formed" mean for XML?
- A well-formed XML document follows all basic XML syntax rules: every opening tag has a closing tag, tags are properly nested, attribute values are quoted, and there is exactly one root element. This is distinct from XML validation against a schema (DTD, XSD).
- Does this validate against a DTD or XML Schema?
- No. This tool checks for well-formedness only, which is the first requirement for any XML document. Full schema validation (DTD, XSD, RelaxNG) requires a dedicated validator with the schema file.
- Why does my XML show an error?
- Common XML errors include unclosed tags, mismatched tag names, unescaped characters (use &, <, > instead of &, <, >), missing quotes around attribute values, or multiple root elements.
The XML Validator checks whether your XML document is well-formed according to the XML specification. It uses the browser's native DOMParser to parse the document and checks for the presence of parsererror elements. Shows a clear VALID or ERROR badge with detailed error messages including line and column information when available.