Start a project

Tool 84 of 244 · Performance

SVG Optimiser

Clean up SVGs exported from Illustrator, Inkscape or Figma: smaller files, no hidden editor data or scripts, and previews to prove nothing changed.

SVG Optimiser at a glanceIllustration: 1, An SVG export; 2, processed in your browser; 3, Clean, smaller SVG.SVG Optimiser</>1An SVG export3Clean, smaller SVG2In yourbrowser
1 An SVG export 2 processed on your device 3 Clean, smaller SVG

SVG Optimiser

Your SVG

Clean-up
2 is safe for icons. Compare the previews if you go lower.

Result

Before
–
After
–
Saved
–
Gzipped
–

Original SVG
Original
Optimised SVG
Optimised
Optimised SVG

01

What it does

Safely strips editor data, scripts and whitespace, rounds numbers and shortens colours, with side-by-side previews.

  • Removes Inkscape, Illustrator and Figma data
  • Strips scripts and event handlers
  • Rounds path data and numbers safely
  • Before and after previews

02

Private by design

Everything happens in your browser. Nothing you type, paste or upload is sent anywhere, and it keeps working offline once the page has loaded.

03

What you get

Optimised .svg, with a Copy and a Download button on every result.

  • SVG
  • Minify
  • Security
  • Icons

Why it matters

Design tools save SVGs with a lot of extra information: layer names, editor settings, comments and numbers with six decimal places that no screen can show. That can make an icon several times bigger than it needs to be.

SVGs can also contain scripts. If your site lets people upload SVGs, or you use icons from an unknown source, a script inside one can run when the file is opened directly. This optimiser removes scripts and event handlers by default, as well as shrinking the file.

How it works

  1. InputSVG markup or a file
  2. In your browserMetadata, comments and extra precision stripped
  3. OutputA smaller SVG, with sizes before, after and gzipped

Where it fits in a designer's workflow

  1. Plan
  2. Design
  3. Build
  4. Test
  5. Launch
Every time an icon or illustration leaves the design tool.

By the numbers

This site's five largest SVGs, raw and gzippedstromascape-v4.svg (raw): 7.0 KB; stromascape-v4.svg (gzip): 3.5 KB, 49% less; signature.svg (raw): 3.3 KB; signature.svg (gzip): 1.7 KB, 49% less; logo-lj.svg (raw): 1.5 KB; logo-lj.svg (gzip): 682 bytes, 55% less; favicon.svg (raw): 1.5 KB; favicon.svg (gzip): 682 bytes, 55% less; sitemap.svg (raw): 826 bytes; sitemap.svg (gzip): 306 bytes, 63% lessstromascape-v4.svg (raw)7.0 KBstromascape-v4.svg (gzip)3.5 KB, 49% lesssignature.svg (raw)3.3 KBsignature.svg (gzip)1.7 KB, 49% lesslogo-lj.svg (raw)1.5 KBlogo-lj.svg (gzip)682 bytes, 55% lessfavicon.svg (raw)1.5 KBfavicon.svg (gzip)682 bytes, 55% lesssitemap.svg (raw)826 bytessitemap.svg (gzip)306 bytes, 63% less
Measured from leej.uk's own SVG files, which are already minified, so the remaining saving is compression on the wire (gzip level 9 here; Cloudflare also serves Brotli). On an editor export, the optimiser's clean-up usually comes first, then this.
Show the numbers as a table
FileRawGzipped
img/projects/stromascape-v4.svg7.0 KB3.5 KB
img/signature.svg3.3 KB1.7 KB
img/logo-lj.svg1.5 KB682 bytes
img/favicon.svg1.5 KB682 bytes
img/tools/sitemap.svg826 bytes306 bytes

How to use it

  1. Paste SVG code, open an .svg file, or load the example.
  2. Leave the clean-up options on unless you need something kept.
  3. Compare the original and optimised previews. If they differ, add a decimal place.
  4. Copy or download the optimised SVG.

FAQ

Is it as good as SVGO?

It does the safe, high-value parts of what SVGO does and nothing that risks changing how the image looks. For build pipelines, use SVGO; for quick one-offs, this is faster.

Why keep the title element?

A title gives the SVG an accessible name when it's used inline, so screen readers can describe it. Only editor metadata is removed.

Should I remove width and height?

Remove them if the SVG should fill its container. Keep them for icons with a fixed size so the page doesn't jump while it loads.

Is my SVG uploaded?

No. It's read and rewritten in your browser.

Work with me

Want a site that gets these right?

I build fast, accessible websites and web apps that pass these checks from day one. Tell me about your project and I'll reply personally with honest next steps.

All developer tools · Back to leej.uk