Skip to content
ConvertOwl

Compress SVG - And See Where Every Byte Went

Most SVG optimizers give you one number: 42% smaller. That number hides the thing you actually need to know, which is which of those percentage points came from deleting indentation nobody will miss, and which came from rounding coordinates or dropping the accessibility label. This tool reports a byte figure for every pass, on your file, and lets you switch any of them off. It runs entirely in a Web Worker on your own device - the only tool in our SVG set that can, because optimizing is pure text work with no rendering in it. Nothing is uploaded, and the sanitizer runs first on every file whether you ask for it or not, because this tool hands SVG source back to you and you are going to paste it into a page.

How to use this tool

  1. Drop in your SVG files

    Drag one or more SVGs onto the box above, up to 5 MB each. Each file is checked by its contents rather than its name, and refused with a specific reason if it is not really an SVG or if it carries an entity-expansion payload.

  2. Choose which passes run

    Twelve switches, all on by default except one. Removing the <title> element is deliberately off, because that is what a screen reader announces for your graphic - turn it on and the panel warns you in place rather than quietly saving forty bytes at the cost of the label.

  3. Set the coordinate precision

    The slider controls how many decimal places survive in path data, defaulting to three. On editor exports this is often the single biggest saving, because Illustrator writes coordinates to eight decimals that describe positions finer than a printer can resolve.

  4. Optimize and compare

    Each file shows the original and the optimized version side by side. If those two thumbnails ever differ, a pass has broken something - that visual check is there precisely so you never have to take the result on trust.

  5. Copy or download

    Copy the optimized source straight to your clipboard for pasting inline, or download it as a file. With several files converted, take the lot as a single ZIP.

Frequently Asked Questions

How much smaller will my file actually get?

It depends entirely on where the file came from, far more than on the drawing. We measured four: an Illustrator-style export went from 1,091 to 401 bytes, 63% smaller. A Figma-style export went 730 to 525, 28%. The Lucide download icon managed 4%, and our own site logo just 2%.

Why did the icon barely shrink at all?

Because it was already optimized before it reached us. The Lucide file is 291 bytes of pure geometry with no comments, no metadata, no editor attributes and short coordinates - there is simply nothing an optimizer can remove without changing the picture. A good icon set ships files that are already at the floor.

Which pass saves the most?

On the Illustrator export: removing the metadata block saved 216 bytes, rounding coordinates 131, comments 94, default attributes 61, unused definitions 51, the XML declaration 38, and converting style attributes 29. On the Figma export the picture was completely different - 141 of its 205 saved bytes came from unused definitions alone.

Why does Figma leave so much unused in the file?

It exports the layer structure it uses internally. Frame and layer names become id attributes nothing references, and clip paths and gradients defined for the artboard often survive into a file that never points at them. Those ids are dead weight in the file, and removing them is the single largest win on a Figma export.

Is it safe to remove IDs?

Almost always, with one exception worth knowing. We only remove an id nothing in the file references, and we check url(#…) values, href attributes and CSS inside <style>. What we cannot see is external CSS or JavaScript on your page targeting that id - if you style or script an inline SVG from outside it, switch this pass off.

Should I remove the <title> element?

Usually not, which is why it is the one pass that is off by default. <title> is the accessible name of the graphic: it is what a screen reader reads out, and without it the image is anonymous to anyone not looking at it. The saving is typically a few dozen bytes, which is a poor trade.

Can rounding coordinates break my drawing?

Not at three decimals for normal artwork. Three decimal places on a 24-unit icon resolves to about a forty-thousandth of its width, which no display or printer can show. Push the slider to zero decimals on a small viewBox and you will see shapes snap - the preview beside each file is there to catch exactly that.

How do I know the optimized file still looks the same?

Two ways. Every file shows before and after thumbnails side by side, and our test suite rasterizes both versions of several real exports and compares them pixel by pixel, allowing at most a couple of levels of anti-aliasing drift. A pass that changed the picture would fail that comparison before it shipped.

Why not use svgo?

Its browser bundle pulls in a full CSS parser tree and a plugin architecture we would use a tenth of, which would land on every visitor to this page. This implements the passes that produce most real-world savings and nothing else, so the whole optimizer downloads only when you drop a file.

Does this remove scripts and tracking from my SVG?

Yes, and that pass is not optional. Scripts, event handlers, remote image references and external stylesheet imports are stripped from every file, and the panel lists what it found. That matters more here than in our other SVG tools, because this one gives you source back to paste into your own page.

Does gzip make this pointless?

No, though it narrows the gap. Your server almost certainly gzips or brotlis SVG in transit, and compression handles repeated indentation well. What it cannot do is delete a 216-byte metadata block or shorten eight-decimal coordinates - that content still has to be compressed and decompressed, and it still costs bytes in the transfer.

Something not working? Report a bug

Guides & articles