Developer Tools

XML Minifier

Validate XML and remove whitespace that appears only between tags.

Free to use No account needed Quick result

Tool workspace

Private by design

Your result

Your result will appear here…

About the XML Minifier

The XML Minifier first rejects malformed documents, then removes comments and formatting whitespace between markup boundaries. Text content inside elements remains intact.

How to use the XML Minifier

  1. Paste well-formed XML.
  2. Minify the tag-to-tag whitespace.
  3. Download the compact document and test its consumer.

Practical tips

  • Whitespace can be data in mixed-content formats, so keep a source copy.
  • Minification is separate from gzip or Brotli transport compression.
Helpful answers

XML Minifier FAQs