Compact XML by removing comments and presentation indentation while preserving attributes.
The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.
Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.
Optional comments are removed, XML is parsed with attributes preserved, and a compact builder serializes the tree without formatting indentation. An XML declaration can be restored and UTF-8 byte sizes are compared.
<project> <modelVersion>4.0.0</modelVersion> <!-- Project coordinates --> <groupId>com.example</groupId> <artifactId>my-app</artifactId> <version>1.0.0</version> </project>
<project><modelVersion>4.0.0</modelVersion><groupId>com.example</groupId><artifactId>my-app</artifactId><version>1.0.0</version></project>
SOAP payloads, SVG assets, and generated XML configuration are compacted.