2026-10-03
An SVG exported from a design tool is rarely as small as it could be. Inkscape adds a namespace and a named view, Illustrator adds a block of its own metadata, Sketch leaves comments, and almost every editor writes coordinates with six or more decimal places. None of that changes what a browser draws, and all of it is bytes you ship.
SVG Optimizer removes that bookkeeping in your browser tab. You drop in a file or paste the code and get the smaller SVG back, with the before and after size and a side-by-side preview.
The SVG is parsed in a document that is never attached to the page. Script elements, on-event attributes and javascript: links are always removed, and the previews use image elements, which do not run scripts.
SVGO is the standard open-source SVG optimizer, and SVGOMG is a well-known browser front-end for it. They offer many more transformations than this tool, such as merging paths, converting shapes to paths and applying transforms. If you want maximum compression, or you want SVG optimization inside a build step, SVGO is the better fit and this tool is not a replacement for it.
This tool is aimed at the quick case: you have one file, you want it smaller without installing anything, and you want to see that it still looks right. It makes only conservative changes, so the result rarely differs from the original. Both options for removing unused IDs and for removing title and desc are off by default, because CSS or JavaScript on your page may target those IDs and screen readers read the title and desc.
Rounding to three decimal places is invisible at normal sizes. A small icon that you later scale up a lot can show differences at zero or one decimal place, so check the Original and Optimized previews when you lower the precision.
For a private, no-install clean-up of an exported SVG with a visible before and after, and a PNG when you need one, try the SVG Optimizer. For build pipelines and the deepest compression, use SVGO. If your image is a JPG, PNG or WebP rather than an SVG, the Image Compressor is the matching tool, and the Image Resizer and Image Converter cover resizing and format changes. To embed a small SVG in CSS or HTML, Image to Base64 gives you the data URI.