Skip to content
helpyself

SVG Minifier

Local only — nothing is uploaded unless you save or share it.

An SVG minifier that strips editor clutter and scripts, without touching the artwork.

  1. Paste your SVG source, or drop the file's contents in
  2. Choose how precisely to keep coordinates — two decimals is plenty for an icon
  3. Minify, check the preview still looks right, then copy or download

Title and description are kept by default — a screen reader reads them out.

Share a link

Saves this to your files and gives you a web address anyone can open. It stops working on its own.

Link lasts
Save this tool

Keep SVG Minifier handy

Bookmark it

About this tool

An SVG exported from Illustrator, Figma or Inkscape carries a lot that has nothing to do with the picture. There is a metadata block naming the document and its author, editor namespaces recording grid and guide settings, a generator comment, and coordinates written to twelve decimal places because that is what the maths produced. On a typical icon that bookkeeping is most of the file, and none of it changes a single pixel. Removing it usually cuts the size by half or more. The other half of the job is not about size at all. SVG is XML, so it can contain script elements and onclick attributes, which is exactly why many sites refuse SVG uploads: a file served from your own domain and opened directly runs its script with your origin's privileges. Script elements, event handlers and dangerous link addresses are removed by default here, so what comes out is safe to serve as a file rather than only safe to embed. Text content and title and description elements are left alone, because those are what a screen reader reads out.

Frequently asked questions

Will minifying change how my icon looks?

It should not. Nothing here restructures the drawing: there is no path merging, no shape conversion and no reordering. The only visible risk is coordinate rounding, which is why the precision is adjustable and there is a preview beside the output. Set it to off if you are working at very large scale.

What does it strip when I minify SVG?

Editor leftovers, mostly: the layer names, grid settings and version tags that Illustrator, Figma and Inkscape write into the file and nothing ever reads. To compress svg output this way is lossless — the drawing is untouched, so a clean svg looks pixel-for-pixel like the one you dropped in, at a fraction of the bytes.

Why does it remove scripts by default?

Because an SVG can contain them, and a file served from your own domain runs its script with your origin's privileges. That is the reason so many sites reject SVG uploads outright. Removing script elements, event handlers and dangerous link addresses is what makes the output safe to serve directly.

Are the title and description kept?

Yes, unless you ask for them to go. Most minifiers drop them silently, but they are the accessible name and description that a screen reader announces. Removing them saves very little and costs a real thing, so it is a choice rather than a default.

Why is removing unused ids switched off?

Because an id may be referenced from outside the file. References inside it are all checked, but CSS or JavaScript in the page that embeds the SVG cannot be seen from here. The saving is small and the breakage would be invisible, so you have to opt in.

How much smaller will my file get?

For an editor export, usually between forty and seventy per cent, and the figure is shown after every run. A file that has already been minified will barely change, which is the correct outcome rather than a failure.

Help improve this tool

Found a bug, want a change, or need a tool we don't have?

/svg-minifier

↑↓ to move · Enter to open · Esc to close