Category: Developer tools

XML Minifier

System ideaMissing a tool?

Strip whitespace between XML tags locally

Compress XML by removing the whitespace between tags, while keeping comments and CDATA sections intact. Your XML stays in your browser and is not uploaded.

Minified.

Original size207 BMinified size186 B
Minified XML
<?xml version="1.0" encoding="UTF-8"?><catalog site="LocalTools"><tool id="xml-minifier"><name>XML Minifier</name><private>true</private></tool><!-- everything runs locally --></catalog>

This strips whitespace between tags; it does not validate well-formedness.

Everything on this page is processed in your browser. Nothing is uploaded.

What this tool does

This tool scans XML-like text locally and removes whitespace-only text between tags and inside opening tags, without building a full DOM tree. It complements the XML Formatter, which does the opposite: it re-indents XML for readability.

How to use it

  1. Paste XML into the input box, or load the example.
  2. Review the minified output and the size difference.
  3. Copy the compact XML for storage or transmission.

Privacy

This tool runs entirely in your browser. Your input is never uploaded, stored or shared — closing the tab removes it.

Frequently asked questions

Is my XML uploaded anywhere?
No. Minifying happens locally in your browser; nothing is sent to a server.
Are comments and CDATA sections preserved?
Yes. Comments and CDATA blocks are copied through untouched; only the whitespace between tags is removed.
Does it validate the XML?
No. It only strips whitespace; it does not check well-formedness or validate against a schema.