Example: a logo exported from Inkscape
A web designer receives a client's logo as an SVG saved from Inkscape: a rounded square and a triangle. It carries a comment, an XML declaration, a named view, a metadata block, an empty group, a hidden rectangle, editor attributes and coordinates written to six decimal places.
With the default settings the results read 1.0 KB before and 0.2 KB after (1,054 bytes down to 254), saving 76%. The changes line lists comments, the XML declaration, editor elements and namespaces, metadata, empty groups, a hidden element, five unused ids, four editor attributes, five rounded numbers and one minified path. The two previews look identical.
harbour-logo.svg, 1.0 KB, default settings
harbour-logo.min.svg, 0.2 KB, saved 0.8 KB (76%)
Optimising a file
Open or paste the SVG
Press Open an SVG file, or paste the code into the box.
Choose what to remove
Ticked by default: Editor data, Metadata, Hidden elements, Empty groups and Unused ids. Title and description is left unticked because it helps screen readers.
Set the precision
Decimal places from 0 to 4; the default of 2 suits most logos and icons. Tick Indent output if you want readable code.
Compare and download
Check the before and after previews, read the list of changes, then copy the code or download the
.min.svgfile.
What each option removes
| Option | Removes | Safe? |
|---|---|---|
| Editor data | Inkscape, Sodipodi, Illustrator and similar namespaces and attributes | Yes, browsers ignore them |
| Metadata | Metadata blocks, comments, the XML declaration | Yes |
| Hidden elements | Shapes set to display none | Usually; check previews if scripts show them |
| Empty groups | Groups with nothing inside | Yes |
| Unused ids | Ids that nothing refers to | Yes, unless your own CSS or code targets them |
| Title and description | Accessible name and description | Keep them for logos on websites |
Questions people ask
How do I reduce an SVG file size?
Remove what the browser does not need: editor data, metadata, comments, hidden shapes and empty groups, then round coordinates to two decimal places. This tool does all of that with the default settings and shows the saving in bytes and as a percentage.
Will optimising change how my SVG looks?
With the defaults it should look the same, and the two previews let you check. Lower precision or removing hidden elements that scripts reveal later can change the result, so compare before you replace the original file.
Should I optimise an SVG for BIMI email logos?
Cleaning helps, but BIMI logos must follow a specific SVG profile with its own rules, and a title element is expected. Optimise here with Title and description kept, then check the result with the BIMI SVG validator.
Where your data goes
The SVG is parsed and rewritten in your browser. The file is not uploaded and the code is not stored.
Checked against the tool on