Source SVG
paste or type · or drop a .svg file
Optimized SVG
-53%
Optimizing is not sanitizing: leave this on unless you have a specific reason to keep a script.
Before
Original SVG preview
After
Optimized SVG preview
397 B → 185 B · 53% savedpowered by SVGO

Why optimize SVG?

Design tools (Figma, Illustrator, Sketch) export SVG with editor metadata, excessive coordinate precision, and redundant grouping that add nothing visually but bloat the file. SVGO removes it while keeping the rendered result identical.

TypicalShrinks 30-60% on tool-exported files
RemovesComments, metadata, editor namespaces, excess precision
KeepsVisual output — always compare the before/after preview

What the optimizer changes

SVGO runs a real XML parser and a set of transform passes: it strips comments and <metadata>, merges and shortens paths, converts basic shapes to paths where smaller, rounds numeric precision, and drops unused namespace declarations and empty groups.

None of this is a lossy visual change; SVGO's default preset is designed to preserve rendering. Still, always check the before/after preview below, since an unusual SVG (heavy use of CSS classes, embedded fonts) is more likely to hit an edge case than a plain icon.

Optimizing is not sanitizing

SVG can carry a <script> element or onload/onclick event handlers, and SVGO's default preset does not touch either — they pass straight through an "optimized" file. The "Strip scripts & event handlers" toggle above (on by default) explicitly removes both, plus javascript: links.

This matters if you plan to inline the output directly into a page with v-html or dangerouslySetInnerHTML rather than use it as an <img> src: an inlined SVG executes any script it carries, an <img>-loaded one never does.