Compress SVG
Make SVG drawings smaller by removing editor data and metadata and writing paths and numbers shorter, while ids, classes and styles stay.
Converted in an isolated sandbox on our serversDeleted after 24 hours
Drop SVG files on the dialor turn it to pick what to do
An SVG that carries less.Editor data and metadata come out, and ids, classes and styles stay.
What it does
The tool rewrites your SVG so it takes less space without changing how it looks. It removes comments, the XML declaration and doctype, metadata, editor data and attributes that SVG does not define. Default values and groups that do nothing are left out.
Paths, transforms, colors and styles are written in a shorter form. Numbers keep up to 5 decimal places.
What stays
Ids, classes, titles, style rules, scripts, animations, data attributes and ARIA attributes stay. So do hidden elements and the kind of every shape, so pages and sprites that use them keep working. The width and height keep their units.
If the drawing has animations, scripts or CSS transitions, paths and transforms stay as they are written.
Choosing a size
Size sets how many decimal places the coordinates and other numbers keep. Fewer places make a smaller file.
Smallest keeps 1 decimal place. Edges and text can move slightly, most visibly on small icons drawn large. Balanced keeps 3, and the drawing looks the same. It is the choice used when you change nothing. Best keeps 5.
Input and output
A gzipped SVG comes back as a plain SVG. A drawing that does not get smaller comes back as it was. For other conversions, see every SVG conversion.
Questions.What people ask about compressing SVG.
At Balanced the drawing looks the same. At Smallest, edges and text can move slightly, most visibly on small icons drawn large.
Yes. Ids, classes, titles, style rules, scripts, animations, data attributes and ARIA attributes all stay.
Balanced is the default and keeps the look. Pick Smallest for the fewest decimal places, or Best to keep the most.
It comes back as a plain SVG, not gzipped.