Image Tools

SVG Optimizer

SVG files exported from design tools carry a great deal of invisible overhead: editor metadata, comments, unused definitions and needlessly precise numbers. Optimising strips all of it while leaving the graphic pixel-identical, commonly cutting file size by half or more.

Runs entirely in your browser — your images are never uploaded.

What to remove

How to

How to use the SVG Optimizer

  1. 1

    Add your SVG

    Upload a file or paste the markup directly.

  2. 2

    Optimise

    Metadata, comments, unused definitions and excess decimal places are removed.

  3. 3

    Compare

    The original and optimised versions render side by side so you can confirm nothing changed visually.

  4. 4

    Copy or download

    Take the cleaned markup or save it as a file.

Examples

SVG Optimizer examples

Illustrator export

Input
24 KB SVG straight from the editor
Output
Around 6–10 KB

Design tools embed generator comments, layer names and document metadata that browsers ignore entirely.

Excessive precision

Input
d="M 12.000000001 8.999999998 …"
Output
d="M12 9…"

Coordinates carrying ten decimal places are meaningless on screen and can be a large share of the file.

Icon set

Input
40 icons exported from a design tool
Output
Each roughly 60% smaller

Icons are small, so the fixed metadata overhead is proportionally huge. Optimising matters most here.

Why use it

What the SVG Optimizer gives you

Visual comparison

Both versions render side by side, so you can confirm the optimisation changed nothing you can see.

Removes hidden metadata

Editor exports can carry document titles, layer names and file paths. Optimising strips information you may not want published.

Substantial savings

Half the file size is typical for editor exports, and more for small icons where metadata dominates.

Paste or upload

Works from a file or from markup pasted straight out of your editor.

Runs locally

Your graphics are never uploaded.

Good to know

SVG Optimizer limitations

  • Optimisation is aimed at safety, so it will not always match the smallest possible output from an aggressive command-line configuration.
  • SVGs relying on external stylesheets or scripts may behave differently once cleaned — always check the comparison.
  • IDs referenced by your own CSS or JavaScript are preserved, which limits how much can be removed.
  • Very large SVGs may take a moment to process.

Summary

SVG Optimizer in short

  • Editor-exported SVGs are typically half metadata that browsers ignore.
  • Optimising removes it without changing the rendered graphic.
  • Small icons benefit most, since fixed overhead is a larger share of the file.
  • Always check the side-by-side comparison before publishing.

FAQ

SVG Optimizer questions

What does optimising an SVG do?

It removes everything the browser does not need to draw the graphic: editor metadata, comments, empty groups, unused definitions and excessive decimal precision. The rendered result is unchanged.

How much smaller will my file be?

Half is typical for a design-tool export, and small icons often shrink by 60–70% because fixed metadata is a larger share of a small file. Hand-written SVG that is already lean may barely change.

Will it break my graphic?

The defaults are conservative and preserve IDs and structure that scripts or CSS might reference. The side-by-side comparison exists so you can confirm before publishing.

Why are exported SVGs so large?

Design tools record their own document structure — layer names, generator comments, colour profiles, sometimes file paths — none of which a browser reads. Coordinates are also written with far more precision than a screen can show.

Does it remove hidden information?

Yes. Exports can embed document titles, layer names and occasionally local file paths. Optimising strips them, which is worth doing before publishing a file publicly.

Is optimising still worth it if my server gzips?

Yes. Compression shrinks the transfer, but the browser still parses the full markup. Optimising reduces both, and the two combine well.

Should I inline SVG or link it?

Inline for icons you style with CSS or animate, since it avoids a request and allows styling. Link larger illustrations so they can be cached separately.

Are animations preserved?

SMIL animations and CSS inside the SVG are kept. As with any optimisation, check the comparison — animations that depend on specific IDs are worth verifying.

Is my file uploaded?

No. SVGO's browser build runs as JavaScript inside this page, so your graphics are never uploaded. An icon set you have not shipped yet stays entirely on your machine.

Discover

Related image tools