XML Formatter and Validator
Format, minify and check XML in your browser. Errors are shown in plain text so you can find the broken tag quickly. Nothing is uploaded.
Common XML errors
| Problem | Example | Fix |
|---|---|---|
| Unclosed tag | <name>Sam | Add </name> |
| Wrong nesting | <a><b></a></b> | Close inner tags first |
| Unescaped ampersand | Tom & Sam | Write & |
| Unquoted attribute | <a id=1> | Write id="1" |
| Several root elements | <a/><b/> | Wrap them in one parent |
Frequently asked questions
How do I format XML online?
Paste your XML, choose an indent size and press Format. The tool checks the XML first and shows an error if it is not well-formed.
What does well-formed XML mean?
Every tag is closed, tags nest correctly, attribute values are quoted, and there is exactly one root element. Well-formed does not mean valid against a schema.
Does this validate against an XSD or DTD?
No. It checks that the XML is well-formed, which is what a parser needs. Schema validation is not included.
What does minify do?
It removes the indentation and whitespace between tags to make the file smaller. Comments are kept, and text inside elements stays unchanged.
Is my XML uploaded?
No. Parsing happens in your browser, so private files stay on your device.