SVG minifier
Shrink SVG markup by stripping XML cruft, comments and editor metadata.
SVG minifier
Paste an SVG exported from Illustrator, Inkscape or Figma and this tool returns a minified version with the same appearance and a much smaller file size. It removes the XML declaration, comments, editor-only metadata (Inkscape's and Illustrator's namespaced elements and attributes), empty groups and the whitespace between tags — all things a browser or an <img> tag never needed in the first place.
Decimal places controls how many digits coordinates and other numeric attributes keep, so "12.34567" becomes "12.35" at the default of two. Remove id and class attributes drops both, except an id still targeted by a url(#…) fill or an href="#…" reference — those stay, so gradients, clip paths and <use> elements keep working. Remove width/height, keep viewBox strips the outer dimensions only when a viewBox is present to take over sizing, so the SVG still scales correctly. Shorten hex colors turns "#ffffff" into "#fff" wherever all three channels double up, leaving anything else untouched.
Malformed markup — an unclosed or mismatched tag — is reported as an error instead of guessed at, since a minifier that silently patches broken XML can change what renders. Text inside <text>, <tspan> and inline <style> stays exactly as written, since whitespace there is part of the content, not formatting. Windows and Unix line endings are handled the same way, and the live tally shows bytes in, bytes out and the percentage saved.
Everything runs locally in your browser: the SVG never leaves your device, which matters for unpublished icon sets and client artwork. Copy the result, download it as a .txt file, or send it back into the input to apply another pass with different options.