Why does SVG need optimization?
SVG exported from Figma, Illustrator or Inkscape is often 5-10x bigger than it needs to be. They add piles of metadata (`<metadata>`, `<title>`, the editor that produced the file), long class names, default attributes (`fill="black"` even though that is the default), coordinates with 15 decimal places (`d="M12.345678901234567,5.987654321"`) and editor comments.
The optimizer strips everything unnecessary while keeping the rendering identical. A 12 KB file becomes 2 KB. Less to download, faster FCP, smaller bundle.
Paste your SVG, pick the options (what to strip, how many decimals to round to), inspect the side-by-side visual to confirm nothing broke, copy or download the result. Everything runs in your browser - the file never leaves.
How to use
- Paste SVG code in the left panel or click "Upload file" to load from disk.
- On the right you see the optimized version. Below: a before/after visual comparison - they should look identical.
- In the options section: tick what you want to strip. Defaults are aggressive (max savings).
- The precision slider controls decimal places for paths. 2 is fine for most icons, 4 for precision graphics.
- Hit "Copy" to copy the result to clipboard or "Download" to save as a file.
When this helps
Typical situations where SVG cleanup pays off:
- Icons in an app. You export 50 icons from Figma, each is 3 KB - after optimization 400 bytes. That is 150 KB less in your bundle.
- Logo on the homepage. An Illustrator export often has 30-50 KB of metadata. After cleanup it is 3 KB - better performance.
- SVG backgrounds. A hero section pattern has to be light because it blocks above-the-fold rendering.
- Inline SVG inside a React component. Less code, easier to read. Optimize before pasting into a component.
- SVG sprite. Hundreds of icons in one file - every byte matters.
- Email. SVG in emails (where supported) gains a lot from minification.
- CSS-in-JS. Inline SVG as a string in a TypeScript file needs to stay short.
Next, convert your SVG to a React component with SVG to component. For raster image editing see image compressor.