SVG Optimizer

Run SVGO in your browser to shrink SVG files, with a side by side preview and before and after sizes.

Drop SVG files here or click to chooseSeveral at once is fine. Or paste markup into the Source box below.

SVGO defaults with ids kept. Right for almost every icon and illustration.

3

Digits kept after the decimal point. Lower is smaller; too low distorts fine detail.

Repeat until nothing shrinks further.

Indent the output for reading. Larger file.

100 %
Original627 B
Original rendering of star.svg
Optimized275 B
Optimized rendering of star.svg

56.1% smaller : 627 B to 275 B.

Example input7 lines, 627 B
1 line, 275 B
Copy as

Related tools

What it does

Runs the real SVGO optimizer engine on your SVG, right in your browser, and shows byte level before and after stats. Comments, editor metadata (Inkscape and Illustrator cruft), and redundant precision get stripped, paths get merged and shortened, and the result is a smaller file that still renders identically. A side by side preview shows the original next to the result on a checkerboard, light, or dark background, with the raw and gzipped sizes of each. Three presets (Safe, Balanced, Aggressive) cover most files, and every one of the 23 optimizations can be switched on its own.

How to use it

Drop one or several SVG files, or paste markup into the Source box. Pick a preset, then adjust decimal precision or open the full list of optimizations if you want a different tradeoff (higher precision for detailed illustrations, keep ids for scripts and ARIA references). Compare the two previews, then copy or download the optimized file, or copy it as a data URI, a CSS background, or JSX. A warning appears whenever a setting that can change rendering, such as removing viewBox, is switched on.

Why this one

The popular SVGO web frontends make you upload your artwork to a server, and many of them lag behind the actual SVGO releases with outdated defaults. This tool runs the current SVGO engine locally: your files and inputs never leave your device. The preview draws both versions through an image element, so a script inside an SVG cannot run on the page.

FAQ
Is this the real SVGO, or a reimplementation?
It is the actual SVGO engine, the same one that popular web based SVG optimizers wrap around a server upload.
Why does it keep the viewBox attribute by default?
Removing viewBox breaks an SVG's ability to scale responsively with CSS, so it stays unless you switch on "Remove viewBox" in the Risky group, and the page shows a warning while it is on.
Is my SVG file uploaded anywhere?
No. Optimization runs entirely in your browser: your files and inputs never leave your device.

Keyboard shortcuts: press ? anywhere on this page to see them.