XML Minifier
Strip comments and unnecessary whitespace from XML, live as you type.
<note><to>Alice</to><from>Bob</from><body>Don't forget the meeting.</body></note>Strips comments and inter-tag whitespace live as you type. Everything runs in your browser; nothing is sent anywhere.
Need the opposite? XML Prettify
What is XML Minifier?
This tool removes comments and the whitespace between tags in an XML document, shrinking its size without changing what it means. Useful before shipping a config file or feed where every byte counts. A smaller XML payload matters for an RSS/Atom feed served to many clients, or a config file embedded somewhere with a size limit. Minification runs entirely in your browser, so the source document never has to be uploaded anywhere.
How to Use XML Minifier
- 1
Paste the Formatted XML: Enter indented XML, such as a feed or config file.
- 2
Read the Minified Result Instantly: The compact output appears automatically as you type.
- 3
Copy the Result: Use the copy button to copy the minified XML.
How It Works
XML comments (`<!-- -->`) are removed, and whitespace that exists only between tags (the indentation and line breaks that make nested markup readable) is stripped out. Text content that actually sits inside an element is left exactly as it was, since removing that would change what the document means.
Example
<note>
<!-- reminder -->
<to>Alice</to>
<text>Meeting at noon</text>
</note><note><to>Alice</to><text>Meeting at noon</text></note>The comment and every inter-tag line break are gone; the text inside each element is untouched.
Common Use Cases
Shrinking an RSS/Atom feed or a config file before it's served or embedded somewhere with a size constraint. Every byte of formatting whitespace removed is a byte the recipient doesn't have to download.
Frequently Asked Questions
Common questions about XML Minifier.