SVG Optimizer

Strip metadata, editor attributes and redundant precision out of an SVG.

Make an SVG Smaller Without Breaking It

An SVG exported from a design tool is mostly not the drawing. It carries the editor’s namespace and layer names, a metadata block, a title and description nobody reads, empty groups left over from the layer structure, and path coordinates written to fourteen decimal places when two would be invisible.

Removing all of it commonly halves the file, and the risk — that an optimisation quietly changes the drawing — is why both versions are rendered side by side here.

Key features

  • Before and after previews — rendered from the actual markup, so a broken optimisation is visible immediately.
  • Editor cruft removed — Sketch, Illustrator, Inkscape and Figma namespaces and attributes.
  • Coordinate rounding — from 0 to 5 decimal places, where most icons are indistinguishable at 2.
  • Unused ids stripped — but only the ones nothing references, checked against the source first.
  • Every step optional — switch off anything that changes your particular file.
100% client-side — no data leaves your machine

This tool runs entirely inside your browser using native Web APIs. Your files and text are never uploaded to a server, never logged and never shared with third parties.

How to use: SVG Optimizer

  1. Paste your SVG
    Straight out of the export. The before preview appears immediately.
  2. Compare the previews
    They should be identical. If they are not, switch off the option that broke it.
  3. Tune the rounding
    Two decimal places is safe for icons; complex illustrations may want three.
  4. Copy or download
    The optimised markup, ready to paste inline or save as a file.

Technical specifications

Processing locationEntirely in your browser — no server round trip
Data uploadedNone. Files and text never leave your device
PriceFree — no account, no trial, no usage cap
CategoryDeveloper
Works offlineYes, once the page has loaded
Browser supportChrome 90+, Edge 90+, Firefox 90+, Safari 15+
Interface languagesEnglish, 中文, हिन्दी, Español, العربية

Frequently asked questions

How much smaller will my file get?

An export straight out of a design tool commonly halves, sometimes better. A file that has already been optimised will barely move, and the tool says so rather than pretending otherwise.

Is it safe to strip ids?

Only the unreferenced ones, and the tool checks the source for <code>url(#id)</code>, <code>href="#id"</code> and animation references before removing any. Ids referenced from an external stylesheet or from your own JavaScript cannot be seen, so leave the option off if you style the SVG from outside.

Why did rounding change how my drawing looks?

Because a very small shape can rely on precision that rounding removes. Raise the decimal places until the previews match — the difference between 2 and 3 places is usually a few bytes.

Does this remove the title and description?

Yes, with "strip metadata" on. Be aware that <code>&lt;title&gt;</code> inside an SVG is read by screen readers, so for a meaningful image — rather than a decorative icon — it is worth putting back or replacing with an <code>aria-label</code>.

Related tools

Back to all tools