Icon Optimizer
Paste an SVG icon and strip the bloat that illustration tools leave behind — comments, XML declarations, editor namespaces (Inkscape, Sodipodi, XLink), <metadata> blocks, default attributes, redundant whitespace — and round every coordinate to 2 decimals. See before/after size, live preview, then copy or download the clean SVG.
How to use
- 1
Paste your SVG
Drop the SVG markup exported by Figma, Illustrator, Inkscape or another vector tool into the input box. Use “Load sample” to try it out.
- 2
Toggle options
Enable or disable individual optimisations. The default set is safe for icons: strip comments, namespaces, metadata, defaults, round coordinates to 2 dp and collapse whitespace.
- 3
Optimise and preview
Click “Optimise”. The clean SVG appears on the right, with before/after sizes and a live preview at three resolutions.
- 4
Copy or download
Use the Copy button to copy the optimised SVG to your clipboard, or Download to save it as an .svg file.
Common use cases
- Strip Inkscape/Sodipodi bloat from SVG icons before committing them.
- Shrink icon bundles for inline use in HTML or JSX.
- Normalise hand-tweaked icons by rounding messy floating-point coordinates.
- Prepare SVG icons for use as React components or icon font source files.
Limitations
- This is a regex-based optimiser — it never reorders attributes, merges paths or simplifies geometry. For deeper optimisation use SVGO locally.
- Coordinate rounding applies to known numeric attributes (d, points, x, y, etc.) and may affect gradients/transforms if they share attribute names.
- Inputs larger than 1 MB are rejected to keep the UI responsive.