XML formatter, minifier and validator
Paste XML on a single line or with uneven indentation and turn it into a readable document. If a tag is unclosed or mismatched, the tool tells you near which line the problem is. Everything is processed in your browser.
Processed 100% in your browser
Ctrl + Enter runCtrl + C copy result
How to use
- 1Paste your XML into the input box.
- 2Choose the indentation and whether to keep comments.
- 3Click “Format” or “Minify”.
- 4If an error appears, fix the line shown and try again.
Use cases
- Read an API or SOAP response that arrives unformatted.
- Review a sitemap, an RSS feed or a configuration file.
- Compress XML before sending or storing it.
- Find the tag left unclosed in a long document.
Frequently asked questions
Does it validate XML?
It checks that the structure is correct: tags properly opened, closed and nested, and comments and CDATA complete. It does not validate against an XSD schema or DTD.
Are comments and declarations kept?
Yes, by default comments, CDATA and the initial declaration are kept. You can remove comments by unchecking the box.
Is my file uploaded to a server?
No. Formatting happens in your browser, so you can work with private or confidential documents.
Can I use it for HTML?
For HTML, the HTML formatter is better, since it tolerates unclosed tags like br or img. XML is stricter and would flag them as errors.