ZapKit

SVG optimizer

Make SVG icons and illustrations smaller and cleaner before they go on a website, without changing how they look.

What is an SVG optimizer?

An SVG optimizer removes everything in an SVG file that browsers don't need to draw it. SVGs exported from design tools often carry extra data such as editor settings, comments and very precise numbers, which can make them several times larger than necessary.

Paste markup or open a file, choose how many decimal places to keep and which extras to remove, and compare the original and optimized versions side by side. Download the smaller file, copy the code, or copy it as a CSS background data URI.

How to use the SVG optimizer

  1. 1.Open or paste an SVG

    From Illustrator, Figma, Inkscape or anywhere else.

  2. 2.Choose options

    Decimal places and what to remove.

  3. 3.Compare and save

    Check the preview, then download, copy, or use it as a CSS background.

Example: an exported icon

A checkmark icon exported from a design app with metadata and six-decimal coordinates:

Removed
comment, metadata, editor attributes, empty group, unused ids
Path data
M 36.123456 62.987654 L 52.000000 … → M36.12 62.99L52 …
Precision
2 decimal places

The icon looks identical but its file is a fraction of the original size.

Safe changes only

Design apps leave behind editor attributes, metadata, comments, empty groups and coordinates with six decimal places. The optimizer removes those, shortens path data and colours, drops attributes that only repeat a default value, and removes ids nothing refers to.

Default values are kept when a parent element sets something different, so inherited styles aren't broken. Title and description are kept unless you choose to remove them, because screen readers use them.

Frequently asked questions

How many decimal places should I keep?

2 suits most icons and illustrations; 1 is often fine for large shapes. Compare the previews if unsure.

Will it break animations or scripts?

Ids used by CSS, links or animations are kept. Check interactive SVGs after optimizing.

Why is my SVG barely smaller?

It was probably already optimized, or most of its size is an embedded photo, which this doesn't recompress.

Is my file uploaded?

No. It's optimized in your browser, and previews can't run scripts.

More Developer tools