← All tools

XML Minifier

Remove XML comments and indentation locally while preserving mixed text, CDATA and protected spaces.

xml-minifierLOCAL WORKSPACE

Your XML stays in this tab. No upload or storage. Up to 512 KiB.

Supported XML and formatting effects

Removes line-break indentation in elements without text. Same-line spaces, mixed text, CDATA and xml:space retain their layout. Minification changes document bytes. Keep the original of a signed document.

Result

Enter XML to see the result.

How to use this tool

Paste XML or choose a UTF-8 XML file, select what to remove, and download the entire result.

When not to use it

Keep original bytes for signed XML and preserve indentation when whitespace matters to the receiver.