XML Minifier

Compress XML files by removing whitespace between tags. Free online XML minifier.
XML input
Minify options

Need readable output? Open XML Formatter.

Tool Introduction

Use this XML minifier to make XML payloads smaller before sending them through APIs, saving config files, publishing sitemaps, or embedding SVG and RSS data. It removes formatting whitespace and optional comments while keeping text, CDATA, attributes, namespaces, and processing instructions intact.

Validation is enabled by default so malformed XML is flagged before the editor changes your input. Turn it off when you need to clean up partial fragments during debugging.