SVG Minifier

Shrink SVG files: removes comments, editor metadata and extra spaces, and rounds path numbers. Great for icons and logos.

Also called: SVG optimizer, compress SVG.

FreeNo sign-upRuns in your browser
DESIGN

SVG Minifier

Shrink SVG files: removes comments, editor metadata and extra spaces, and rounds path numbers. Great for icons and logos.

Runs locally in your browser
Ready. Fill in the fields above, then press Run tool.
Privacy note: this tool runs in your browser, so the text you enter stays on your device.

Find a tool

Loading tools…

Watch: how to use the SVG Minifier (12 seconds)

Recorded on a phone, steps written on screen, no sound.

About the SVG Minifier

Shrink SVG icons and logos: removes comments, editor metadata (Inkscape, Illustrator) and extra spaces, and rounds path numbers to the decimal places you choose (2 by default).

How to use the SVG Minifier

  1. Add your inputFill in SVG code and decimal places in paths. An example is already filled in, so you can press Run tool first to see how it works.
  2. Press Run toolThe result appears right under the button.
  3. Copy or download the resultCopy text results with Copy output; when the tool makes a picture or file, use its Download button.

This tool works inside your browser: what you enter stays on your device.

Example

A sample input and the result the SVG Minifier gives for it (produced by the tool itself, not typed by hand).

SVG code
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"> <!-- icon --> <path d="M12.00001 2.5 L 22 21.123456 H 2 Z"/> </svg>
Decimal places in paths
2

Result:

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2.5L22 21.12H2Z"/></svg>

Size: 132 → 97 bytes (27% smaller)

Good to know

What you need
You type or choose: SVG code, Decimal places in paths
Where it runs
In your browser, on your device.
Cost
Free, no sign-up.

Questions

Will rounding change the drawing?

Two decimals is usually invisible; use more for tiny icons.

Need a PNG?

Use SVG to PNG Converter.

More tools in Design

See all Design tools