Home
Tom Utilities

XML Minifier

XML & YAML Tools

Remove whitespace between XML tags to produce the smallest payload.

Input

Result

How to use

How to minify XML

Press Minify to strip indentation. Whitespace inside text nodes is preserved.

  1. Paste XML into the input editor.
  2. Press Minify.
  3. Copy the compact output.

Frequently asked questions

Will it break my text content?

No. Only whitespace between tags is removed, text inside elements is untouched.

Does it keep comments?

Yes, comments and processing instructions are preserved.