SVG optimizer
Make an SVG file smaller by removing editor data, comments and extra digits. The picture looks the same. Nothing is uploaded.
SVG
Options
What it does
SVG optimizer shrinks an SVG file with SVGO, the standard tool for this. Files exported from design programs carry editor metadata, comments, empty groups, unused definitions and numbers with far more digits than any screen can show. The optimizer removes them, shortens paths and merges what can be merged, then shows the picture before and after with the saved size. You choose how many decimal places to keep and whether to keep the viewBox, the ids and the title. The viewBox and the ids are kept by default, so the SVG still scales with CSS and still works with scripts. If the file cannot get any smaller, you get it back unchanged. It runs in your browser, nothing is uploaded.
How to use it
- 1Drop an SVG file.
- 2Compare the picture before and after, and change the options if you like.
- 3Download the smaller SVG or copy its code.
Common uses
- Shrink logos and icons before you put them on a website.
- Clean an SVG exported from Figma, Illustrator or Inkscape.
- Cut the size of icons that ship inside an app or an email.
- Reduce the weight of a page that has many inline SVGs.
- Remove editor metadata before you share a file.
- Check how much of an SVG is real shape data and how much is extra.
Questions
Is my SVG uploaded?
No. The file is optimized in your browser and never leaves your device.
Will the picture look different?
No, not in a way you can see. The tool only removes what has no effect on the drawing and rounds numbers to the decimal places you choose.
What are decimal places for?
Path numbers often have six or more digits. Three digits are enough for almost every icon. Use more for very large drawings and fewer for small icons.
Why keep the viewBox?
Without a viewBox an SVG cannot scale with CSS width and height. It is kept by default, and the file stays safe to resize.
Why keep the ids?
CSS, scripts and links can point at an id. Renaming or removing it would break them, so ids are kept by default.
Why did my file not get smaller?
Some SVGs are already minimal, for example one produced by an optimizer. Then you get the original back.
Which size limit applies?
Files up to 8 MB. Bigger SVGs are usually traced photos, which are better kept as WebP.