How to optimize an SVG
- Paste SVG code into the box, or choose one or more .svg files.
- Adjust the options if you want to. The result updates by itself, with the size before and after and a picture of each.
- Copy the optimized code, download the file, or download all files together as a ZIP.
SVGs exported from design tools often carry editor data, comments, and long numbers that browsers do not need. Removing them commonly makes icons and logos 30 to 70 percent smaller. If the Optimized preview looks different from the Original, raise the number precision or turn off the option you suspect.
Questions
Are my SVG files uploaded?
No. SVGO runs in your browser, in a background thread. Your files are read and optimized on your device and are never sent to a server.
Will optimizing change how my SVG looks?
It should look the same. The default settings remove only data that does not affect drawing, and round numbers to 3 decimal places. Compare the Original and Optimized previews, and raise the number precision if a detailed drawing looks slightly off.
Why is "Keep viewBox" on by default?
The viewBox lets an SVG scale to any size. Without it, an image with a fixed width and height cannot be resized with CSS. Turn it off only if you have checked that your SVG still scales the way you need.
Why do some of my icons break after optimizing?
The usual cause is shortened IDs, when CSS or JavaScript elsewhere refers to an ID inside the SVG. Turn off "Shorten and clean up IDs" and optimize again. SVGs that rely on <style> rules for classes keep working with the default settings.
Can I optimize many files at once?
Yes. Choose or drop several SVG files, see the saving for each, and press "Download all as ZIP". Optimized files are named like logo.min.svg, so your originals are never overwritten.
Credits
Built on SVGO (MIT). OneTooling is not affiliated with that project.