XML

XML Minifier

Compress XML by stripping indentation and insignificant whitespace — see the size savings instantly.

Minification runs locally in your browser. Nothing is uploaded, logged, or stored.

0 chars
1
Paste pretty-printed XML here...
0 chars
Result appears here

How to use

  1. Paste your formatted XML into the input panel.
  2. Click Minify — indentation and whitespace between tags are removed.
  3. Compare the character counts, then copy or download the compact result.

What gets removed?

Only whitespace that sits between tags (where it carries no meaning in XML) is stripped, along with indentation and redundant newlines. Text inside elements, attribute values, and comments are preserved exactly, so the minified output parses to the same data as the original.

Want the opposite direction? Expand compact XML with the XML Formatter, or shrink markup pages with the HTML Minifier.

Examples

Shrink config files

Minify verbose XML configs before committing or bundling them to save space.

Reduce payload size

Compact XML before sending it over an API or storing it in a database column.

Frequently Asked Questions

Is my XML uploaded anywhere?+
No. Minification happens entirely in your browser.
Will minifying change my data?+
No — only insignificant whitespace between tags is removed. Element text and attribute values stay byte-identical.
Are XML comments kept?+
Comments are preserved; only surrounding whitespace is trimmed.
How much can I save?+
Pretty-printed XML typically shrinks 20–50%, depending on how deep and heavily indented it is.

Related Tools

Looking for something else? Browse all tools