Skip to content
Jellykit

XML Minifier

Minify XML by removing indentation, line breaks and comments between tags. See how many bytes you saved. Text and CDATA stay intact. Free, private, instant.

Runs in your browser. Nothing is uploaded.

About XML Minifier

XML Minifier removes the whitespace between tags and, optionally, comments, producing the most compact form of the same document. Extra spaces inside tags are collapsed too.

Text content and CDATA blocks are not touched, so the data is identical after minifying. The stats show the original and minified size and the percentage saved.

How to use XML Minifier

  1. Type or paste your text into the input box. Press Sample to see an example.
  2. Adjust the options. The result updates as you type.
  3. Copy the result, or press Use as input to chain another transformation.

Frequently asked questions

Is minified XML still valid?

Yes. Whitespace between elements is insignificant in most XML, and the document is checked for well-formedness before minifying.

When should I not minify?

If whitespace inside mixed content matters (for example in XHTML paragraphs), review the output first.

Is XML Minifier free and private?

Yes. XML Minifier is completely free with no sign-up. Everything runs in your browser, so whatever you type or paste never leaves your device.

See all data tools →