use UI

SVG Optimiser

Paste an SVG and see it cleaned up next to the original — same shape, fewer bytes. Every transform here is one that cannot change how the file renders, and the before/after preview is there so you can check rather than trust.

Original

Optimised

What to strip

Editor prologs, <title>, <desc> and XML comments.

data-name, serif:id, inkscape:* and empty classes.

Leaves the viewBox, so the icon scales to its container.

Swaps literal fills and strokes so CSS can colour it.

2

Coordinates carry far more digits than a screen can show. Two places is usually invisible; check the preview if the shape is tiny.

Frequently asked

Is this SVGO?

No. SVGO's browser build is around 200 kB and does far more than this needs, including transforms that are known to change how some files render. The steps here are hand-written and deliberately conservative: metadata, editor attributes, number precision, and whitespace. Path merging, shape-to-path conversion and matrix flattening are left out on purpose.

Why is the saving smaller than other tools report?

Because the risky transforms are missing, and because those tools often measure against an unminified original. The honest comparison is bytes in versus bytes out on the same file — which is what the header shows. For a typical Figma or Illustrator export, most of the win comes from metadata and number precision anyway.

What does dropping width and height do?

It leaves only the viewBox, which makes the SVG scale to whatever box you put it in rather than insisting on its exported size. That is almost always what you want for an icon in a component. Leave it on only if you are embedding the file directly and want its natural size.

Is it safe to round the coordinates?

At two decimals, on an icon rendered at normal sizes, the difference is well below one pixel. It stops being safe when the artwork is drawn in a tiny viewBox and scaled up a lot, because the rounding scales up with it. That is exactly why the preview sits next to the output — look at it before you ship.

Does my file get uploaded?

No. The SVG is parsed and rewritten in your browser; nothing is sent to a server and nothing is stored. It is also parsed before anything is changed — if the markup has a syntax error the tool stops and says so rather than optimising broken input into worse broken input.

Related tools