SVG Optimiser
Shrink an SVG by removing metadata, comments, editor attributes and auto-generated ids, converting styles to attributes and rounding coordinates, with a preview.
Free · No sign-up · Your inputs stay in your browser
Input
Optimise an SVG
Output
Optimised SVG
0 characters
Removes what design tools leave behind (XML declaration, comments, metadata, Inkscape and Sketch attributes, auto-generated ids, empty groups), turns style attributes into presentation attributes and rounds coordinates. Two decimals is plenty for icons drawn on a 24-unit grid; keep more for large illustrations. currentColor lets an icon take its colour from the surrounding text, and dark mode with it. SVGO does all this and more in a build step.
Runs in this browser. Nothing you paste is sent to a server.
About this tool
Method, assumptions, practical next steps, and limits.
Where the bytes come from
Design tools save their own editing state in exported SVGs: layer names, guides, generator comments and coordinates with eight decimal places. For an icon drawn on a 24-unit grid, two decimals are invisible and often halve the file. Build pipelines use SVGO for the same job with more transformations.
currentColor for icons
An icon whose fill is currentColor takes the text colour of its parent, so it follows hover states and dark mode with no extra CSS. Inline SVG is needed for that; an img tag cannot inherit colour.