SVG Optimizer
Shrink SVG files in your browser. Strip metadata, collapse groups, round numeric precision, and optionally remove width/height for responsive scaling.
What does an SVG optimizer do?
SVG files exported from design tools (Figma, Sketch, Illustrator, Inkscape) are usually 30-70% bigger than they need to be. Editors leave behind comments, signature metadata, redundant CSS, empty groups, and excessive numeric precision that no human eye can perceive. An optimizer rewrites the same drawing into a smaller, equivalent SVG — pixel-identical to a renderer, but a fraction of the file size. Everything happens locally on your device — your SVG is never uploaded, never copied to a server, never logged. That privacy guarantee matters for branding files, internal product icons, and any SVG that should not sit on a third-party server. The defaults are tuned for icon-grade work: precision is set to 2 decimals, comments and editor metadata go, useless groups collapse, and the original viewBox stays intact for responsive scaling. For illustrations with subtle curves bump precision up to 3; for responsive icon sets the remove dimensions option strips the fixed width/height attributes so CSS can scale the icons to whatever size you set in your stylesheet.
How to optimize an SVG
Paste the SVG markup or drop a .svg file onto the dropzone. Tweak the option checkboxes — defaults are sensible. Pick the numeric precision (2 is fine for most icons), then press Optimize. The before/after preview lets you confirm nothing visual changed. Copy the optimized markup or download the file directly.
Tips that save more bytes
Run a single colour palette and avoid embedded raster images — base64-encoded PNGs inside SVG defeat the format. Convert text to paths only when you need a specific glyph; otherwise keep <text> tags so screen readers and search engines see the content. Compress the resulting file with gzip/brotli on your server: optimized SVG compresses very well, often hitting 70% of the post-optimization size.
What each option does
| Option | Effect | Notes |
|---|---|---|
| Remove comments | Strips blocks editors leave behind. | Almost always safe. Disable only if comments document the file. |
| Remove metadata | Removes | Safe — metadata is for the design tool, not the renderer. |
| Collapse useless groups | Removes | Visually identical, often saves 5–15%. |
| Remove width/height (responsive SVG) | Strips the width/height attributes so CSS sizes the SVG. | Useful for icon systems; off by default to keep the file standalone. |
| Numeric precision | Rounds path numbers to N decimals. | 2 is the default, 3 for fine illustrations, 1 only for tiny icons. |
Frequently asked questions
Will optimization break my SVG?
Is anything uploaded?
What about SVG sprites or symbols?
How small should icons be?
Should I keep xmlns and viewBox?
xmlns the SVG will not render outside HTML5; without viewBox you lose responsive scaling. Both attributes are tiny and worth keeping.
EN
PT
ES