XML Validator
Check XML syntax and view its root element and element count.
Check whether an XML document parses and inspect its root and element count.
How to use the xml validator
Paste XML to check whether a browser parser accepts it. The tool reports the root element and total element count.
Example
<items><item>One</item></items> has root items and two elements.
Good to know
Well-formed XML is not the same as validation against an XSD or DTD schema.
Check the document structure and its consumer
Use a complete document or the exact fragment requested by the input label. XML element names are case-sensitive, attributes require quotes, and namespaces give names their context. An apparent matching tag in a different namespace can describe something different. Preserve the original encoding declaration and a source copy when moving between systems. Use a compact sample first so an unexpected change is easy to locate.
How to review the result
Inspect the result with the rules of the receiving application in mind. A well-formed XML document is not necessarily valid against its schema or suitable for a particular feed, drawing or configuration format. Check text content, attributes, namespaces and repeated elements rather than comparing indentation alone. If the tool extracts a subset, compare it with a known source element; absence from the report does not establish absence from every part of the source file.
- Confirm namespace prefixes still resolve to the intended namespace URI.
- Check escaping for ampersands, angle brackets and attribute quotes.
- Test the result with the application's own schema or import validator when available.
Common questions about this workflow
Does a syntax check prove the document is valid for its format?
No. Syntax establishes that the markup can be parsed. A format-specific schema can impose additional requirements such as element order, permitted values and required attributes. Application behavior needs a separate check.
Why are some XML features restricted?
Document types and external entities can refer to resources outside the pasted document. Follow the restrictions stated by the tool and use self-contained input. Removing a declaration is only appropriate if the target document no longer depends on it.
Built by DevBricks Technologies. Found an unexpected result in XML Validator? Report a reproducible example with the tool URL, settings and a small sample that contains no private information.