Skip to content
Devtoolry

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

  1. Paste XML or open a file.
  2. Optionally keep comments.
  3. 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.