Input XML
Minified Output
Original: 0 BMinified: 0 BSaved: 0.0%
XML Full Form
XML stands for eXtensible Markup Language — a structured text format used for configuration files, document storage (OpenDocument, OOXML), enterprise message payloads (SOAP), feeds (RSS, Atom), and many other data interchange scenarios. XML files are typically pretty-printed with indentation and comments for humans; minification strips those away to reduce size.
What this tool does
- Strip comments — Removes
<!-- ... -->comments. - Collapse whitespace — Removes indentation and newlines between tags and inside text nodes.
- Preserve CDATA — Contents of
<![CDATA[...]]>sections are kept byte-for-byte. - Respect
xml:space="preserve"— Elements marked with this attribute have their contents left untouched. - Byte savings — See original vs minified byte counts and percentage saved.
When you need an XML minifier
- API payloads — SOAP, legacy REST, and SAP/Oracle interfaces still exchange XML. Minified payloads travel faster.
- Configuration files — Spring, Ant, Maven, and Android manifests where you want a compact committed version.
- Feeds — RSS and Atom feeds served at scale benefit from every byte saved.
- Sitemaps — Search-engine sitemaps have a 50 MB limit; minifying lets you pack more URLs per file.
Privacy
Everything runs locally in your browser. Your XML is never sent to our servers. You can minify internal configs, SOAP envelopes with auth tokens, or private document payloads without anything leaving your machine.
Frequently Asked Questions
If your XML is signed (XML Digital Signature) or canonicalized before hashing, do not minify after signing — whitespace changes invalidate the signature. Minify first, then sign. The tool preserves CDATA and
xml:space="preserve", which covers the common cases where whitespace is semantically meaningful.Yes. All namespace declarations, attribute values, and processing instructions (
<?xml ...?>) are retained. Attribute whitespace inside quoted values is preserved — only whitespace between tags and at the boundaries of text nodes is collapsed.Entity references are passed through untouched. The minifier is a text-level tool — it does not parse to a DOM or decode entities, so
&, <, { and custom entities are preserved exactly.Indented XML usually shrinks by 20–50%, depending on nesting depth and verbosity. After gzip the savings are smaller but real — minification removes bytes the compressor still has to encode.
No. All minification happens in your browser. Nothing is sent to our servers, logged, or cached anywhere except the current browser tab.
Click Beautify to indent the XML with one element per line. Stripped comments are not recoverable, but the tag structure is fully restored and readable.