Minify SVG code for websites: one line, no comments, short path data, same picture
Processed in your browser. Nothing is uploaded. Checked against sources on 17 Oct 2026.Icons exported from Figma, Illustrator or Inkscape carry comments, editor namespaces and coordinates like 10.000000. Drop the files here and each becomes one compact line: path data rewritten in its shortest legal form, numbers rounded to three decimals, empty groups removed. Text, styles and titles are kept, so the icon renders and reads the same. Nothing is uploaded.
Drop your files or click to choose them.
Adjust the options and check the preview.
Download the result. Nothing was uploaded.
An SVG is text, and drawing programs write a lot of text that a browser never uses: comments, an XML declaration, a metadata block, their own namespaces for layers and zoom level, and coordinates with six decimals. This page removes that and keeps the drawing.
| Before | After |
|---|---|
<!-- Created with Inkscape -->, <metadata>, inkscape:label="Layer 1" |
Removed |
M 10.000000,20.500000 L 30.123456,40.987654 |
M10 20.5L30.123 40.988 |
viewBox="0.000 0.000 210.0000 100.5000" |
viewBox="0 0 210 100.5" |
r="10.50px", stroke-width="1.0000" |
r="10.5", stroke-width="1" |
Empty <g></g> and <defs/> |
Removed |
| Line breaks and indentation between tags | Removed |
Checks before saving. A file with a tag that is never closed, or an attribute without quotes, is reported with the problem rather than saved broken. Path data that cannot be read is left as written.
The rest of the article, and all 6 questions about SVG Optimizer, are on the SVG Optimizer page.
Drop the .svg on SVG Optimizer. Comments, metadata and editor data are removed, numbers are rounded to 3 decimals and path data is rewritten in its shortest form at once. The size before and after appears with a preview, and Download saves the smaller file.
Comments, the XML declaration, the DOCTYPE, the metadata block, data from Inkscape, Sodipodi, Sketch, Illustrator and Figma, unused namespace declarations, empty groups and definitions, and whitespace between tags. Titles and descriptions stay unless you choose to remove them, because screen readers use them.
Similar in purpose, with fewer and safer steps. SVGO can also merge paths and convert shapes, which sometimes changes rendering. This page sticks to changes that cannot alter the picture: removing unused data, rounding numbers and writing path data in its shortest legal form.
Yes. Drop up to 200 files together; each is optimised and listed with its saving. Download all saves them in one zip with the same names plus .min.svg, ready for a website or an icon set.
Rates and rules change; check the source before you rely on a figure.
Still stuck? Ask about SVG Optimizer and anybody who knows can answer. No account needed.
Same job, other tools: SVG to AVIF – SVG drawings to AVIF: the smallest modern web format, nothing uploaded · SVG to PNG – Convert SVG drawings to PNG: lossless, transparency kept · Get Color from Image – Find the hex code of a color in a picture, or its whole palette.
On the related tools: HEIC to PNG – Convert iPhone HEIC photos to lossless PNG.