SVG optimizer
Strip editor junk, metadata and extra decimals from SVGs exported by Figma, Illustrator or Inkscape.
Fewer decimals make smaller files. 2–3 is invisible for icons and logos.
Always removed: comments, editor data (Illustrator, Inkscape, Figma, Sketch), metadata, unused ids and empty groups.
How did this tool do?
What gets removed from an SVG, and what stays
An SVG exported from Illustrator, Inkscape, Figma or Sketch carries a lot that never affects how it looks: editor data so the app can reopen it, metadata, comments, ids nothing refers to and empty groups. These are always removed. Coordinates are usually the biggest saving: editors write numbers like 12.4837291, and rounding to 3 decimal places changes nothing you can see. For a small icon, 1 or 2 places is often enough; use Compare to check before you download.
Three things are your choice. Scripts and event handlers are removed by default, because an icon or logo never needs them and they are a security risk when an SVG is opened on its own. The title and description are kept by default, because screen readers use them to describe the image. Removing width and height lets the SVG scale to fit whatever contains it; the viewBox is always kept, so the proportions stay correct.
The optimized code can be copied straight into HTML or a React component, or saved as a file. Smaller SVGs load faster when they're inlined in a page, since inlined SVG code is part of the HTML and can't be cached separately.
Where you'll meet it
Icons for a website
Clean, small SVGs to inline in HTML or a component.
Logos from a designer
Strip the Illustrator data before the logo goes into your code.
Untrusted SVGs
Remove scripts from an SVG before you use it anywhere.
How to use it
- 01Drop your SVG files.
- 02Pick a coordinate precision and what to remove.
- 03Tap Optimize, compare before and after, then download or copy the code.
Optimizing SVGs, answered
Will my SVG look different?
It shouldn't. Only things that don't affect drawing are removed, and coordinates are rounded to the precision you choose. Compare shows both side by side so you can check.
Why remove scripts?
Scripts and event handlers never help an icon or logo, and they're a security risk if an SVG is ever opened directly in a browser.
Should I remove width and height?
Removing them lets the SVG scale to fit its container with CSS. Keep them if your code relies on the SVG's built-in size.
Is anything uploaded?
No. Everything runs in your browser, so your files never leave your device.