XML Minifier
Minify XML by removing comments and whitespace between tags.
About the XML Minifier
The XML Minifier removes comments and whitespace between tags so XML payloads and feeds are as small as possible, while keeping text content intact.
Everything runs in your browser, so your input is never uploaded to a server.
How to use the XML Minifier
- Paste XML or open a file.
- Optionally keep comments.
- Copy or download the minified XML.
Frequently asked questions
Is whitespace inside text removed?
No. Only whitespace between elements is removed; text content and mixed content are preserved.
Is the XML validated first?
Yes. Malformed XML is reported with its location instead of being minified.
Related tools
JSON Minifier
Minify JSON by removing all unnecessary whitespace. Shows the size saved.
HTML Minifier
Minify HTML by removing comments and collapsing whitespace while preserving pre, textarea, script and style blocks.
CSS Minifier
Minify CSS by stripping comments and whitespace to reduce stylesheet size.
JavaScript Minifier
Minify and mangle JavaScript with Terser for smaller bundles. Supports modern ES syntax.
SQL Minifier
Compress SQL queries onto a single line, removing comments and redundant whitespace.
JSON Formatter
Format and beautify JSON with configurable indentation and optional key sorting. Errors are reported with exact line and column.