Text UtilitiesText FormattersFree Tool
XML Minifier
Compress XML by stripping comments and collapsing whitespace between tags.
How to Use XML Minifier
- 1Paste your XML
- 2Click Convert
- 3Copy the minified output
Frequently Asked Questions
<!-- comments -->, and all whitespace between tags (removed entirely between '>' and '<').
No — only structural whitespace between tags and comments are removed; text content and attribute values are preserved exactly.
Functionally yes — Formatter expands with indentation, Minifier compresses. They're separate tools with inverse logic.
No — minification happens entirely in your browser.
Related Tools
JSON Formatter
Pretty-print JSON with real 2-space indentation using the browser's native JSON parser — shows the exact parse error if your JSON is invalid.
JSON Minifier
Compress JSON to its smallest valid form by removing all whitespace, using the native JSON parser.
XML Formatter
Reformat XML with proper nested indentation based on tag depth — a lightweight tag-based indenter, not a full XML parser.
HTML Formatter
Reformat HTML with proper nested indentation based on tag depth — a lightweight tag-based indenter, not a full HTML parser.