XML Minifier

Remove extra spaces, line breaks and comments from XML to make files smaller.

0.21 KB

How XML Minifier works

Minifies XML by removing comments, line breaks and the spaces between tags. The result is one line of XML that is smaller and faster to send or store.

Before minifying, the tool checks that every tag is closed in the right order. If not, you see the line and column of the error. The size of the input and the output is shown above each box, so you can see how much you saved.

Input to XML Minifier

  • Paste or type XML into the input box, or upload a .xml, .svg, .xhtml, .xsl or .xslt file. Click Minify to run it.
  • Line breaks inside text are removed too, and runs of spaces become one space. Do not use it on XML where spaces in text matter.

Output from XML Minifier

  • Minified XML on one line, with comments removed.
  • The size of the result, to compare with the input size.
  • Copy it, download it as a .xml file or open it in full screen. Use XML Formatter to make it readable again.