Skip to content

Image tool

SVG Optimizer

Optimize an SVG to remove the clutter design tools leave behind and cut its file size.

Runs entirely in your browser. Nothing you paste is uploaded.

Paste SVG code or choose a file to get started.

SVG Optimizer by YegappanFree tool. Open the full page for the guide.

How to use the SVG Optimizer

  1. Paste your SVG code, open an SVG file, or load the sample.
  2. Select Optimize and compare the before and after previews.
  3. Copy the result or download the optimized file.

What gets removed from an SVG

An SVG optimizer, or SVG compressor, makes an SVG file smaller without changing how it looks. This one runs SVGO, the engine behind SVGOMG, in your browser, so the file is never uploaded.

SVG exported from Figma, Illustrator or Inkscape carries a lot that browsers do not need: editor metadata, comments, empty groups, default attribute values and numbers with six decimal places. This tool runs SVGO, the standard optimizer, to remove them and to rewrite paths in their shortest form.

Keep viewBox is on by default because removing it stops the image from scaling. Turn on Keep IDs if your CSS or JavaScript refers to elements by ID. Remove width and height makes the SVG fill its container, which is handy for icons.

Fewer decimal places means a smaller file but less precision. Three is safe for most artwork. For small icons two is usually enough, so always compare the previews. The optimizer is only downloaded when you first use it.

Common questions

How do I compress an SVG file?

Add the SVG or paste its code. The optimizer shows the result next to the original, so you can compare the two before you keep the smaller file.

Will my SVG look different?

It should look the same. Compare the before and after previews, and raise the decimal places if fine details shift.

How much smaller will it be?

Files from design tools often shrink by 30 to 60 percent. Hand-written or already optimized SVG shrinks much less.

Is my file uploaded?

No. SVGO runs in your browser.

Why did my animation or script stop working?

Optimizing can rename or remove IDs. Turn on Keep IDs and try again.

Guides for the SVG Optimizer

Related tools