Map Extract
Free tool

Optimise an SVG

SVGs saved from design apps carry layers of editor notes, metadata and over-precise numbers. Strip them out for a smaller, tidier file that draws the same.

Runs in your browser. Nothing you enter is uploaded.

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.

Input
harbour-logo.svg, 1.0 KB, default settings
Result
harbour-logo.min.svg, 0.2 KB, saved 0.8 KB (76%)

Optimising a file

  1. Open or paste the SVG

    Press Open an SVG file, or paste the code into the box.

  2. 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.

  3. 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.

  4. Compare and download

    Check the before and after previews, read the list of changes, then copy the code or download the .min.svg file.

What each option removes

OptionRemovesSafe?
Editor dataInkscape, Sodipodi, Illustrator and similar namespaces and attributesYes, browsers ignore them
MetadataMetadata blocks, comments, the XML declarationYes
Hidden elementsShapes set to display noneUsually; check previews if scripts show them
Empty groupsGroups with nothing insideYes
Unused idsIds that nothing refers toYes, unless your own CSS or code targets them
Title and descriptionAccessible name and descriptionKeep 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

Top