Minify XML
Minify XML with explicit control over whitespace-only text.
Input & settings
How to use this tool
Paste your source, choose the supported options, then process. Inspect or download the complete result.
Limits and behavior
Removes comments. The strip option removes whitespace-only text nodes and can affect mixed-content documents; choose preserve when spaces carry meaning. Nonempty text and xml:space=preserve content stay intact. DOCTYPE/entity declarations rejected. Maximum total input 1 MB, output 3 MB, JSON nesting 64 levels. Processing stays in your browser worker. Input is limited to 1 MB and output to 3 MB. No input content is saved by CraftAI.
Reduce XML formatting whitespace
Compact an XML document while accounting for whitespace that may be meaningful in some XML content.
Is removing all XML whitespace always safe?
No. Whitespace may matter in text nodes and some applications. Review the selected whitespace behavior.
Related tools: format xml · validate xml