Minify an SVG file
Reduce the size of an SVG file by removing comments and unnecessary whitespace between tags.
How it works
SVG files exported from design software (Illustrator, Figma, Inkscape) often contain comments, generous indentation and line breaks that have no effect on the final rendering. This tool removes XML comments, strips the whitespace between tags and collapses any remaining runs of spaces, reducing the file size without changing its appearance — useful before embedding an SVG icon in a website to reduce page weight.
Could this minification break my SVG?
This tool performs a purely text-based minification (removing comments and unnecessary whitespace) without re-parsing the file's XML structure. For standard SVGs, the result looks identical to the original; if in doubt, always compare the before and after rendering in a browser.
Are there more advanced optimizations than simple minification?
Yes, dedicated tools like SVGO go further (removing unused attributes, simplifying paths, merging groups), but they need to fully analyze the SVG structure. This minifier deliberately sticks to a safe, fast text-based reduction, with no risk of altering the document's structure.
<strong>100% local processing:</strong> minification runs entirely in your browser via WebAssembly, and your SVG file is never sent to a server.