XML Minifier
Remove whitespace between XML tags to produce the smallest payload.
Input
Result
How to use
How to minify XML
Press Minify to strip indentation. Whitespace inside text nodes is preserved.
- Paste XML into the input editor.
- Press Minify.
- Copy the compact output.
Frequently asked questions
Will it break my text content?
No. Only whitespace between tags is removed, text inside elements is untouched.
Does it keep comments?
Yes, comments and processing instructions are preserved.
Related tools
XML Formatter
Pretty print XML with consistent indentation and optional attribute wrapping.
XML Validator
Check that an XML document is well formed and see a clear error description.
JSON Minifier
Remove every unnecessary space and newline to produce the smallest possible JSON payload.
YAML Formatter
Parse and re-serialise YAML with consistent indentation and validation.
YAML Validator
Validate YAML syntax and get a precise error when indentation or structure is wrong.
XML to JSON
Convert XML into JSON with attributes and repeated elements handled sensibly.