Minify XML
Minify XML to reduce file size and payloads
Remove formatting whitespace and comments from XML to reduce its text size. Paste the document and select Minify.
Type or paste XML into the textbox, then press 'Minify'. You can view or copy the compressed result in the textbox on the right hand side of the screen. Refer to the XML Specification for more information about XML, formatting requirements, and markup guidelines.
XML minification removes formatting whitespace, line breaks, and comments to reduce a document's text size. Whitespace and comments can be meaningful to some consumers, especially in mixed content, so review and test the result before replacing the source document.
- Smaller files: removing formatting reduces the number of bytes to store or send.
- Performance: measure the effect with your application. A smaller document does not always mean faster parsing.
- Transfer costs: smaller documents can reduce usage when you pay by the byte.
- Repeated transfers: savings add up when the same document is downloaded often.
- Cleaner transport: Removing comments can avoid shipping internal notes, but minification is not a security control.
Keep a formatted copy for editing and debugging. Minify the tested version when you are ready to use it.
You can use the Encrypt Tool to encrypt XML code online.