Make XML easier to transfer without changing its data
XML files often include indentation and line breaks that make them easier for people to read but add extra characters to the file. If a receiving system only needs the XML content, removing unnecessary whitespace can reduce the file size. Keep the original when human-readable formatting is important.
Select the XML file or paste the markup you need to reduce.
Choose the available compression or whitespace-removal option and review the resulting markup.
Download the output and validate it before using it in an import or integration. Check a few important elements and values against the original.
Whitespace can sometimes be meaningful
Whitespace between XML tags is often formatting, but whitespace inside text content may be part of the actual value. Be cautious when compressing mixed content or XML used in systems with strict formatting expectations. A smaller output is not automatically equivalent for every downstream consumer.
Keep the original XML and validate the result with the receiving application or schema when required. If the goal is to reduce transfer size rather than make the XML compact, a supported archive format may be more appropriate—but the destination must be able to decompress it.