XML editor and validator
Paste XML to check its tags and see whether it is well formed.
Result
✓Well-formed XML document
- Elements
- 3
Inputs
- XML
- <note><to>Ada</to><body>Hello</body></note>
How it is calculated
Tags must be properly nested and closed.
Result
Well-formed XML document
- Elements
- 3
How it is calculated
- Tags must be properly nested and closed.
- The document must have a single root element.
- Comments, processing instructions and CDATA sections are recognized.
Example
<note><to>Ada</to><body>Hello</body></note>
Good to know
- This checks well-formedness, not validity against a DTD or XSD.
- The editor does not load files; paste the content into the text area.
When to use it
- Fix a config or a feed that a program refuses to read.
- Check that every tag is closed before sending a file.
- For a JSON file, use the JSON parser.
Frequently asked questions
What is the difference between well formed and valid?
Well formed means the syntax is correct: tags closed and nested properly. Valid means it also follows a schema, which needs a separate check.
Are XML tags case-sensitive?
Yes. <Item> and <item> are different tags, so a closing tag must match exactly.
Why can a file have only one root?
XML requires a single top element that holds all others. Two elements side by side at the top make the file invalid.