Your files stay on your device

SVG Optimizer

Optimize several files at once and preview before and after.

0 B uploaded — this page has not sent your files anywhere?

Shrink an SVG without changing how it looks

SVGs exported from design tools carry plenty that has nothing to do with the drawing. This tool strips it with the default rules of the open-source SVGO engine and shows before-and-after sizes and previews side by side.

When it helps

Site logos and iconsTrim the header logo and icons so the page loads a little faster.
Icons inlined in codeCopy the optimized code into HTML or a component.
Cleaning up an icon setDrop in dozens at once and download them with Save all.

Common snags

Resizing with CSS crops the image.Copy the viewBox from the original back onto the svg element of the result.
My icon sprite came out nearly empty.Symbols whose IDs aren’t used inside the file were removed.
The pasted code is ignored.While files are in the list, the paste box isn’t used. Clear the list with ✕ and press again.

Tip If the preview differs at all around edges, text or gradients, use the original for that file.

FAQ

What gets optimized?

We apply the default rules of SVGO, the widely used open-source SVG optimizer, in multiple passes. It strips editor metadata, comments and hidden elements, rounds coordinates, merges paths and shortens colors. Files exported straight from a design tool typically shrink by 30–70%; files that are already clean may barely shrink. The default rules also remove some things besides the drawing itself — see “What if the optimized image looks different?” below.

Are my files uploaded anywhere?

No. Processing finishes inside your browser and your files are not uploaded anywhere.

What if the optimized image looks different?

Besides the drawing itself, the default rules change the following. viewBox — if width and height match the viewBox, the viewBox is removed, so resizing the file with CSS can crop the drawing instead of scaling it. <title> — the title that screen readers announce is removed. IDs — IDs not used inside the file are removed and the rest are shortened, so a sprite file referenced from outside as file.svg#id, or CSS and scripts that target those IDs, can break. Check the before/after preview, but it may not show any of this — for files used that way, keep the original.

Multiple files?

Yes. Select several files to optimize them in one go, then save each one or hit [Save all].