About the XML Minifier
The minifier checks the document with the browser's XML parser, then walks its tokens: whitespace-only text between tags is removed, runs of whitespace inside tags are collapsed (<dependency scope = "test" > → <dependency scope="test">), and comments are dropped when Remove comments is ticked. CDATA sections, processing instructions and attribute values are left byte-for-byte intact.
Collapse whitespace in text trims text nodes and reduces internal runs of spaces and newlines to a single space. That is right for data-oriented XML — configuration, SOAP envelopes, sitemaps, RSS feeds, SVG — but untick it for documents where whitespace in text is meaningful, such as elements with xml:space="preserve" or mixed-content prose.
The status line shows the size before and after and the bytes saved. Heavily indented files often shrink by 20–40%. If you minify XML for transport, remember that gzip already removes most of the cost of indentation; minification matters more for storage, embedding XML in strings, or systems that limit message size. The work happens entirely in your browser.
How to use it
- Paste XML or open a file.
- Choose whether to remove comments and collapse text whitespace.
- Fix any well-formedness error that is reported.
- Copy the result or download document.min.xml.