SVG optimizer: minify SVG files without changing how they look
Strip editor leftovers from SVG files exported by Illustrator, Inkscape or Figma and make them smaller
Your files stay with you. Conversion happens inside the browser; no file is ever uploaded to a server.
Did this tool do the job?
Thanks, your feedback came through.
How it works
Choose an SVG file and press Optimize SVG. The tool deletes everything a drawing program writes into the file that never shows up on screen: Inkscape and Illustrator settings, author and licence metadata, comments, empty groups and attributes set to their default value. It then shortens the coordinates of every shape, so a six-digit number such as 20.987654 becomes 20.988 at 3 decimal places. A 21 KB logo with 40 shapes saved from Inkscape, for example, drops to 13 KB at 3 places (38% smaller) and to 11 KB at 1 place. The result downloads under the same name with .min added before the extension, and your original file stays as it was. Nothing is sent to a server; the work happens in your browser.
This tool is also known as svg optimizer, svg optimizer online, minify svg, svg minify online, reduce svg file size, compress svg, svgo online.
What is SVG?
SVG (Scalable Vector Graphics) stores an image as a description of shapes rather than as pixels: "a line from this point to that point, filled navy blue". The description is plain text, so the file opens in any text editor and every unnecessary character adds to its size. Optimizing works by shortening that text without touching what it draws.
What is SVGO?
SVGO (SVG Optimizer) is the most widely used open-source tool for shrinking SVG files; most website build tools run SVGs through it behind the scenes. This page uses the browser version of SVGO: dozens of small clean-up steps are applied in turn, and repeated until the file stops getting smaller, without the file being sent to any server.
What is the difference between minifying an SVG and SVGZ?
Minifying deletes unnecessary code inside the file, and the result is still a plain .svg that every program can open. SVGZ is an SVG packed with gzip: nothing is deleted, the text is compressed like a ZIP and has to be unpacked before use. They are not alternatives. Web servers already gzip SVGs when they send them, so for the web the best result is a minified plain .svg.
When optimizing can change the picture: precision and IDs
Number precision gives the biggest saving and is the only setting that can alter the drawing. An icon drawn on a 24 × 24 grid is fine at 1 decimal place (0.1 unit), but the same setting moves corners on a map whose lines are 0.05 units wide, and thin lines start to merge. Open the result next to the original in your browser; if you see a difference, go up one place.
The second trap is IDs. If a website pulls icons out of one SVG by name with <use href="icons.svg#home">, or CSS and JavaScript find an element by its ID, the optimizer deletes every symbol that nothing inside the file calls and renames the remaining IDs to "a", "b". The file still looks right on its own, but the icons vanish on the site. The result line warns you how many symbols were removed. For such a file, set IDs to Keep.
How much smaller will my SVG get?
It depends on where the file came from. Files saved straight from a drawing program shrink the most, because the program stores its own settings and layer names so it can reopen the file later. A hand-written SVG, or one that has already been through a minifier, rarely loses more than a few percent.
- Inkscape "Inkscape SVG" save → shrinks the most; editor data can be a large part of the file
- Illustrator "Save As → SVG" → comments and extra groups go, a medium saving
- Figma and Canva exports → already lean; most of the saving comes from shorter numbers
- SVG with a photo embedded inside → does not shrink; the result line says so, and the photo needs compressing on its own
Frequently asked questions
How do I reduce the file size of an SVG?
Choose the file here and press Optimize SVG. Editor data and comments that do not affect the picture are removed and the coordinates are shortened. The result line shows the size before and after and the percentage saved.
Does minifying an SVG reduce its quality?
At the recommended 3 decimal places there is no visible difference, because most of what is removed never appears on screen. Quality can only change on fine drawings when precision is lowered to 1 or 2 places. Because SVG is a vector format, it never turns blurry when scaled, whatever the setting.
Why didn't my SVG get any smaller?
If the file has already been through a minifier, or was written cleanly by hand, there is nothing left to remove. The other common reason is a photo embedded inside the SVG as Base64: this tool shrinks vector code and leaves embedded photos alone. The result line tells you how much of the file the photo takes up.
Can I still edit the optimized SVG?
Yes. It stays a standard SVG and opens in Inkscape, Illustrator or Figma. Only layer names and editor-specific settings are lost, so keep the original you work on and put the optimized copy on your website or in your app.