Scrawlspace › Image Tools

SVG Optimizer: Minify SVG with SVGO

Minify SVG files with SVGO to remove editor clutter and shrink them, and compare the original and optimised versions side by side. SVGO runs in your browser, so your files are never uploaded.

How to use SVG Optimizer

  1. Paste SVG code into the input, or drop an SVG file.
  2. Adjust Precision and options such as Multipass, Keep IDs, Remove width/height, Remove <title> and Pretty print.
  3. Check the Preview and Code views of the result and the size saved.
  4. Copy the optimised SVG or Download it.

Frequently asked questions

How do I reduce SVG file size?

Run it through SVGO here. It removes metadata, comments and redundant code and rounds numbers, often making files much smaller without a visible change.

What does SVGO remove?

With its default settings: comments, the XML declaration and doctype, editor metadata and namespaces (such as Inkscape and Illustrator data), hidden and empty elements, default attribute values and unused IDs. It also shortens path data, colours and numbers.

Will optimising change how my SVG looks?

Usually not, but lowering precision too far or removing IDs that scripts or CSS rely on can. Check the preview and use Keep IDs if needed.

Can optimising affect accessibility?

The <title> element gives an SVG its accessible name for screen readers. It is kept unless you tick Remove <title>, which is only right for decorative images.

What does Remove width/height do?

It drops the fixed size and relies on the viewBox, so the SVG scales to fit its container.

Is my SVG uploaded?

No. SVGO runs in your browser.

When the options matter

OptionUse it when
PrecisionLower (1–2) for simple icons; keep 3 or more for detailed illustrations and maps.
MultipassAlmost always: it repeats until nothing more can be removed.
Keep IDsCSS, JavaScript or <use> elements refer to IDs inside the SVG.
Remove width/heightThe SVG should scale with its container, as in responsive layouts.
Pretty printYou'll read or edit the result by hand. Leave it off for production.

Next steps

Inspect the result on light and dark backgrounds in the SVG viewer, or export a raster copy with SVG to PNG. Servers usually gzip SVGs too, but minifying first still cuts the transfer size further.