Skip to content
LovelyTools
EN

XML Minifier

Minify XML by removing whitespace between tags and optional comments.

Processed locally on your device — nothing is uploaded.

About the XML Minifier

Pretty-printed XML is easy to read but larger to send and store. This minifier removes whitespace between tags and, if you want, comments — without touching text content or CDATA sections.

The saving is shown so you can see the difference. Use XML Formatter to make it readable again.

How to use the XML Minifier

  1. Paste XML.
  2. Choose whether to remove comments.
  3. Copy or download the minified XML.

Features

  • Batch files: run the tool on up to 200 files with the same settings and download every result as one ZIP
  • Removes inter-tag whitespace
  • Optional comment removal
  • Keeps CDATA and text
  • Shows size saved

Supported formats

  • Plain text

Frequently asked questions

Can minifying change the meaning of XML?

Whitespace between elements is normally insignificant. If your format treats it as data (mixed content), check the output.

Is my text sent anywhere?

No. Everything runs in your browser, so nothing you paste is uploaded or stored.