SVG optimizer
Optimize SVG files in your browser with SVGO — same render, smaller file.
Runs 100% in your browserHow to optimize an SVG
- Paste or drop SVG. Paste the SVG markup, drop an .svg file, or pick one.
- Pick presets. Default safe optimizations are on; toggle on/off as needed.
- Copy or download. Output is shown beside the input with the savings.
Why exported SVGs are bloated
An SVG is just XML markup, and design tools are generous with it. Exports from Figma, Illustrator and Sketch typically carry a heavy editor namespace, hidden layers and groups, comments, unused IDs and metadata, and coordinate precision taken to absurd lengths — twelve decimal places where three render identically. None of it changes a single pixel on screen, but it can easily double or triple the file size. Optimizing means rewriting that markup to the smallest form that produces the exact same picture, which is what this tool does with SVGO, the standard SVG optimizer.
What the optimizer removes
SVGO runs a series of focused passes: stripping editor metadata and comments, collapsing redundant groups, rounding over-precise numbers, merging paths, and dropping attributes that have no effect. Its default preset is deliberately conservative — it removes the safe things while preserving the rendered output. Multipass re-runs the passes until the file stops shrinking, squeezing out a few extra percent once one cleanup unlocks another. The savings are real and lossless: unlike compressing a photo, nothing about the visible image degrades, because you are only deleting instructions that did nothing.
The one setting to be careful with
Keep removeViewBox off unless you are certain nothing relies on the SVG's
intrinsic sizing — removing the viewBox breaks responsive scaling, a classic way to make an icon
that suddenly will not resize in CSS. Everything runs in your browser, so your markup is never uploaded.
Optimize after any conversion that generates verbose paths, such as
PNG to SVG tracing; if you
ultimately need a raster image instead, rasterize the cleaned file with
SVG to PNG.
Frequently asked questions
- Removes editor metadata, collapses whitespace, simplifies paths, drops unused attributes and rounds long decimals — without changing the rendered output.
- A subset of optimizations are technically lossy at very small decimal precisions — by default the page uses safe presets that preserve visual output. Increase aggressiveness with care on detailed paths.
- No. SVGO runs entirely in your browser as a lazy dynamic import.
- svgo 3.x, the same engine that powers SVGOMG and most CI optimizers.