XML Formatter & Validator
Format, minify and check XML, with errors shown by line and column.
Formatted XML
Examples
Questions
What errors does it find?
Anything that makes XML not well-formed: a closing tag that does not match, a tag that is never closed, an attribute without quotes or used twice, a bare & or <, and more than one root element. Each error shows its line and column.
Does it check against a DTD or XML Schema?
No. It checks that the XML is well-formed, which is what every parser needs first. A DOCTYPE is kept as written but not used for validation.
Why is some text left on one line?
An element that holds text beside other elements, like <p>Hello <b>world</b></p>, is kept as written. Adding line breaks inside it would change the text.
Are comments and CDATA kept?
Yes, both are kept exactly. Tick "Remove comments" when minifying to drop comments.
Is my XML uploaded?
No. Parsing and formatting run in your browser.
Related tools
- JSON Formatter & ValidatorFormat, minify, check and repair JSON, with errors shown by line and column.
- HTML Entity Encoder & DecoderEscape HTML special characters, or decode entities back to text.
- CSS Minifier & BeautifierMinify CSS, or format minified CSS with indentation.
- SQL FormatterFormat SQL with consistent indentation and keyword case, for eight dialects.