How to Use the XML Minifier Online
- 1Paste a copy of the source XML. Include the full element or sample payload you want to keep together.
- 2Look through the compact result and compare the element order and attributes with the original.
- 3Check any comments and gaps between tags that a consumer might expect. Preserve the source for uses that depend on those details.
- 4Copy the output to the fixture or example, then test it with the application that will read it if the structure or whitespace matters.
Input & Output Examples
The comment and indentation between tags are removed, while the item text stays intact.
<items>
<!-- inventory -->
<item>Tea</item>
</items><items><item>Tea</item></items>The gap between elements disappears. The two spaces inside the title and the attribute on the empty element remain.
<record>
<title>Weekly notes</title>
<flag enabled="yes"/>
</record><record><title>Weekly notes</title><flag enabled="yes"/></record>Practical Developer Workflows
- Create a small XML request fixture for a test that compares string output or transmits a compact sample.
- Copy a simple sitemap or feed fragment into a documentation field that benefits from fewer line breaks.
- Compare an indented export with its compact form when checking how much whitespace appears between records.
Zero Server Uploads & Complete Privacy
Runs 100% in your browser; no data is uploaded to any server.
Let us know directly so our engineering team can fix it.