Code and data

XML Minifier

Collapse XML to a single compact line.

  • Free
  • Runs in your browser: nothing is sent
  • No limit: it runs on your device
  • No sign-up
About XML Minifier

Strip comments and the whitespace between elements from XML, SVG, RSS and sitemap files. Text inside elements and CDATA sections is preserved.

  • Removes comments and whitespace between tags
  • Keeps text content and CDATA untouched
  • Works for SVG, RSS, Atom and sitemaps
Questions · 1

Is the result still valid XML?

Yes. Only insignificant whitespace and comments are removed, and the document is checked for well-formedness first.

Use it from code · API

XML Minifier runs in your browser, so there is no server call for it. API docs covers the tools you can call from code.