SVG Optimizer
Pure-frontend SVG slimmer that strips **comments / metadata / editor-specific attributes** (Sketch, Figma, Inkscape) / **default attribute values** (`opacity=1`, `stroke=none`) / empty groups + defs / rounds decimals to a configurable precision, and collapses whitespace. Live before/after preview + savings %.
Enabled optimizations
478 bytes
182 bytesβ62%
Before
After
βΊHow to use
- Paste your SVG source into the left pane, or click Open file to load a
.svg. - Tick the 10 optimisations on the right (all on by default; turn off what you'd rather keep). Precision sets decimal rounding (default 2).
- The right pane updates live with the optimised output and savings % shown in green.
- Side-by-side before / after preview below lets you visually confirm nothing changed.
- Copy for snippet use, or Download .svg for the file.
Tips
- Sketch / Figma exports carry 30-60% editor-only metadata. Toggling 'Strip editor attributes' alone gives a big win.
- Precision 2 is usually invisible β 0.123456 vs 0.12 on a 1000px canvas can't be distinguished by eye. Try 1 for ultra-simple icons; bump to 3 for complex illustrations.
- Stripping default values (
opacity=1,stroke=none,stroke-width=1) is safe because browsers fall back to the same defaults. - vs svgo / svgomg: those carry 70+ plugins for the deepest cuts. We're the 'paste and go with sane defaults' lightweight option.
π‘ 100% local β your SVG never leaves the browser. The before/after preview uses dangerouslySetInnerHTML strictly inside this tool; the content is not used anywhere else.
Related tools
- Image β Base64Drop images β data URI / raw base64 / HTML / CSS one-click copy; paste base64 β preview + download
- HEIC β JPG / PNG / WebPConvert iPhone .heic photos to common formats, batch processing + ZIP download, all in your browser
- Image compress to sizeBinary-search JPEG quality to hit a target file size (300KB / 500KB / 2MB / etc.) β for job sites, government forms, upload limits
- Image Crop (free / aspect / circular)Visual drag-to-crop with locked aspect ratios (1:1 / 16:9 / 3:2β¦), circular mask for avatars, export PNG / JPG / WebP with custom output width