Remove needless data from an SVG, round numbers and shrink the size. Check with the preview that nothing changed visually.
No sign-up, no fees.
Removes needless data from an SVG file.
Rounds numbers and compresses whitespace.
The preview lets you check that the picture didn't change.
Shows how much smaller the file got.
What you type is processed, but never shared with anyone.
SVG optimizer: how to optimize an SVG
The SVG from your design program is bigger than it needs to be and weighs your site down. Three steps:
Add the SVG. Open the file with Choose an SVG file or paste the code into the box.
Set the options. Choose which needless data to remove and how many decimals to round numbers to.
Check the preview and download. If the picture looks the same, take the smaller file with Download or copy the code.
What is SVG optimization?
SVG is an image format that describes drawings with code. Programs like Inkscape, Illustrator or Sketch add plenty to the file that has nothing to do with the drawing: comments, editor settings, document info and overly precise numbers (12.3456789). Optimization cleans these out; the picture stays the same and the file gets smaller. A smaller SVG loads faster.
What gets done?
The XML declaration, DOCTYPE and comments are removed.
<metadata> and editor data (Inkscape, Sodipodi, Sketch…) are removed.
id attributes that nothing refers to are removed; ones in use, like gradients, are kept.
Path (d), coordinate and size numbers are rounded; whitespace in path data is compressed.
CSS inside <style> is minified.
What you need to know
If you round too aggressively (0 decimals), fine detail can break; check the preview. For most drawings, 2 decimals is safe.
<title> and <desc> help screen readers; they stay by default.
Ids used by CSS or url(#...) references are kept; still, if a script targets an id, turn off Remove unused ids.