SVG Optimizer

Optimize SVG markup and compare the result with the original.

Input

Result

Original
Optimized

Processed on this device ·

How to use SVG Optimizer

  1. Drop an SVG file onto the page, or paste its markup into the input box.
  2. Keep multipass optimization on for the smallest result, and keep “Preserve existing IDs” on if your CSS, scripts or links refer to element IDs — then click “Optimize SVG”.
  3. Compare the Original and Optimized previews, check the byte counts, then download the .min.svg file.

About this tool

SVG Optimizer runs SVGO 4.0.0 — the standard open-source SVG optimizer — entirely in your browser, inside a Web Worker, so the page stays responsive while it works. Your SVG files are never uploaded and nothing you optimize is sent anywhere.

It applies SVGO’s preset-default plugin set, with ID cleanup switched off by default so references to your element IDs keep working. Multipass mode runs the plugins repeatedly until no further savings appear, which usually squeezes out a few extra bytes. The result is shown next to the original, with byte counts and the optimized markup, so you can check the appearance before downloading the .min.svg file.

Frequently asked questions

Are my files uploaded anywhere?

No. Optimization runs entirely in your browser using the SVGO 4.0.0 browser build, and your SVG file never leaves your device. The only files your browser fetches are this tool’s own scripts, which are cached for offline use.

What does multipass optimization do?

Multipass runs SVGO’s optimization passes more than once, so each pass can clean up what the previous one exposed — for example, empty groups left behind after other removals. It usually saves a few extra bytes and costs almost nothing, so it is on by default.

How do I check the result still looks right?

Compare the Original and Optimized previews side by side, and check the byte counts and the optimized markup below them. Optimization only removes redundant markup, but always eyeball the preview before using the file — especially for SVGs with animations, filters or scripts.

What does “Preserve existing IDs” do?

It keeps the id attributes in your SVG, by leaving SVGO’s cleanupIds plugin switched off. Keep it on when your CSS, JavaScript, links or <use> references point at an element by its ID — removing those IDs would break the references. Switching it off can shrink the file a little more, but only if nothing refers to those IDs.

What do I get when I download the result?

The Download SVG button saves the optimized markup as a .min.svg file — named after your original file (for example, logo.min.svg), or optimized.min.svg if you pasted the markup instead of opening a file.

Like this tool?

Get Very Useful Tools Pro — one $6/month subscription for all tools: ad-free once ads launch, plus bigger batches and higher limits.

Go Pro — from $6