svg minifier

Minify SVG code online

Compress formatted SVG markup into compact code for shipping while keeping a preview in the loop.

svg minifier tool

Minify SVG

Paste SVG, compact it, preview the result, then download.

Ready

Download output

Remove formatting whitespace

Minify SVG by collapsing whitespace between tags and trimming the document.

Preview compact output

Render the minified result so accidental XML issues are visible.

Pair with formatting

Use the formatter before review and the minifier before delivery.

Minifier example

The same SVG can be readable during review and compact for delivery.

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 160 96" role="img"><title>Check badge</title><rect width="160" height="96" rx="14" fill="#0e7c66"/><path d="M39 55l18 18 64-64" fill="none" stroke="white" stroke-width="10" stroke-linecap="round" stroke-linejoin="round"/></svg>

SVG Minifier FAQ

What does SVG minification remove?

It removes unnecessary whitespace and comments, not required shapes or attributes.

Should I minify before editing?

No. Format for editing, minify when preparing delivery assets.