How to use it
Paste or open a file
XML, SVG, RSS, a sitemap.xml or any other XML file.
Validate
Your browser’s XML parser checks the file. If there is an error, you get the line, column and the parser’s message.
Copy or download
Pick the indent or minify, then copy or download the result.
Common XML errors
| Error | Example | Fix |
|---|---|---|
| Unclosed tag | <a><b></a> | <a><b></b></a> |
| Bare ampersand | <t>A & B</t> | <t>A & B</t> |
| Unquoted attribute | <a id=1> | <a id="1"> |
| More than one root | <a/><b/> | Wrap them in one element |
| Case mismatch | <Item></item> | XML is case-sensitive: use the same name |
Good to know
Mixed text stays as is. Inside an element that mixes text and tags, like <p>Hello <b>you</b></p>, we add no whitespace that could change the meaning; the same for xml:space="preserve".
Encoding. The output is always UTF-8; an encoding="..." in the declaration is rewritten to UTF-8 to match the saved file.
DTD entities. Entities defined in the DOCTYPE are replaced by their values in the output; the DOCTYPE itself is kept.
FAQ
What is XML?
A markup language for data, with opening and closing tags like HTML but with tag names you choose. Sitemaps, RSS, SVG, e-invoices and many systems use it.
How do I find the error in an XML file?
Paste it here: you get the line and column and the parser’s message, plus a “Go to the error” button. With unclosed tags the parser may point to where it noticed the problem rather than where it began.
Does formatting change my data?
No. Only whitespace between tags that hold no text is added or removed; text, attributes, comments and CDATA stay the same.
Is my file uploaded?
No. Validation and formatting happen in your browser; your file never leaves your device.
