Murelio

Loading the features you need.

XML Minifier

Remove whitespace between XML tags and trim the surrounding text for a compact form.

How to use

  1. Enter XML text and run the minifier.

Capabilities and scope

The operation does not parse XML first; it directly removes whitespace in > ... < tag boundaries.

How it works

Whitespace matched between a closing angle bracket and the next opening bracket is removed, then the string is trimmed.

Example

Line breaks between adjacent tags disappear.

Useful for

  • Reduce formatting whitespace in XML already known to be valid

Before you use it

  • Meaningful whitespace in mixed-content XML can be altered and syntax is not validated by this action.

Frequently asked questions

Are all spaces inside text nodes removed?

No. The main target is whitespace between adjacent tags.

Related tools