XML Validator (Well-Formedness Checker)
Check that XML is well-formed: tags, quoting, entities, illegal characters and namespace prefixes, with the line, column and a plain-English reason.
Checks well-formedness (XML 1.0 and Namespaces in XML). Validation against a DTD or an XSD schema is not done.
| Prefix | Namespace URI | Declared on | Line |
|---|---|---|---|
| (default) | urn:example:books | <catalog> | 2 |
| dc | http://purl.org/dc/elements/1.1/ | <catalog> | 2 |
An XML file must be well-formed before any program will read it: one root element, every tag closed in the right order, attribute values quoted, & written as &, no illegal control characters. This validator parses the text against the XML 1.0 rules and, if something is wrong, tells you the exact line and column and what to fix. It also checks namespace prefixes, which XML parsers used for SOAP, RSS, SVG and Office files enforce.
How to use this tool
- Paste the XML (a whole document, not a fragment).
- Leave Check namespaces on unless the file deliberately uses prefixes without declarations.
- Read the verdict; if it is not well-formed, go to the line and column shown and use the ^ in the context line.
- Fix the problem — the check runs again as you type.
Formula
document = [XML declaration] misc* [DOCTYPE] misc* element misc*
Exactly one root element; misc means comments, processing instructions and whitespace. Inside elements: start and end tags must match, attribute names must be unique, values quoted and free of <, references must be < > & " ', a numeric reference, or an entity declared in the DOCTYPE. Comments cannot contain --, and the XML declaration may only appear at the very start.
Example
The sample catalog is well-formed: 7 elements, 7 attributes (two of them xmlns declarations), maximum depth 3, and two declared namespaces — the default urn:example:books and dc for Dublin Core. Change </price> to </prices> and the result becomes Not well-formed, pointing at the mismatched closing tag and the line where <price> was opened.
Frequently asked questions
What is the difference between well-formed and valid?
Well-formed means the syntax follows XML rules. Valid means it also matches a DTD or XML Schema (XSD) that says which elements and attributes are allowed. This tool checks well-formedness and namespaces only; DTD and XSD validation are not done.
Why is an error?
XML predefines only five entities. comes from HTML; write   instead, or declare it in a DOCTYPE. If the DOCTYPE points to an external DTD, such references are reported as not checked rather than as errors.
Why does a prefix need a declaration?
A name like dc:title only means something once xmlns:dc="…" binds the prefix to a URI on the element or an ancestor. Namespace-aware parsers reject undeclared prefixes; untick the option to check plain XML 1.0 only.
Is my file uploaded?
No. Checking runs in your browser.
Sources
Last updated:
Page address with these inputs: https://kakao.mobile/tools/xml-validator/
Cite or embed this tool
kakaoCalc. (2026, November 8). XML Validator (Well-Formedness Checker). https://kakao.mobile/tools/xml-validator/
“XML Validator (Well-Formedness Checker).” kakaoCalc, 8 Nov. 2026, kakao.mobile/tools/xml-validator/.
Paste this code into your page. The widget runs in your visitors' browsers, shows no ads and keeps a link back to this page. Embedding terms