Why your SVG file is bigger than it should be
An SVG is a text file that describes shapes. That means it can carry more than the drawing: comments left by the tool that produced it, metadata blocks, empty groups, layers the designer hid instead of deleted, and coordinates written to six decimal places. None of it affects what you see, and all of it is shipped to every visitor who loads the page.
How much of that overhead exists depends on where the file came from. A design-tool export is usually the worst case. A file pulled from an icon library has often been through an optimizer already, so there is almost nothing left to take out.
How much smaller it actually gets
We ran the same optimizer over five real files, all with default settings. The spread is the point:
| Source | Before | After | Reduction |
|---|---|---|---|
| Figma export, one shape | 470 B | 211 B | 55.1% |
| TypeScript logo (Simple Icons) | 1,309 B | 1,042 B | 20.4% |
| React logo (Simple Icons) | 2,941 B | 2,664 B | 9.4% |
| Figma logo (Simple Icons) | 1,108 B | 1,045 B | 5.7% |
| Docker logo (Simple Icons) | 1,780 B | 1,766 B | 0.8% |
The library icons were already minified when they were published, so almost nothing was left to remove. The Figma export still had the comment, the wrapper group, a hidden rectangle and coordinates like M24.0000001 4.0000002, and it lost more than half its bytes.
This is why a compressor that advertises “up to 80% smaller” is not lying, and also why your own file might barely move. The number depends on the input, and the only honest answer for a specific file is to run it and look.
Which parts of the file get changed
An optimization pass does four kinds of work, and only the last two can change what the drawing looks like.
- Deleting what the drawing does not use. Comments, metadata, doomed-by-default attributes, unused definitions, empty containers and editor namespaces. This is always visually safe.
- Writing the same thing shorter. Colours like
#ffffffbecome#fff, groups with one child are flattened, styles move inline, attribute order is normalised. The rendering is identical. - Rewriting the geometry. Paths are converted between absolute and relative commands, curves are simplified, and numbers are rounded to a fixed precision. This is where a thin stroke or a tight corner can change.
- Removing things that carry meaning. Title and description elements hold the accessible name of the graphic; ID cleanup renames identifiers that CSS and scripts may reference. Both are removable and both can break something.
The switches in this tool are grouped the same way, so you can turn off the last two categories and keep only the safe cleanup if you want.
Three ways an optimized SVG comes back broken
None of these produce an error. The file stays valid XML, opens in any editor, and looks fine in a thumbnail.
A coordinate becomes NaN. The path is syntactically valid but the browser cannot draw it, so the shape disappears. It is worth knowing that a broken file is often smaller than a correct one, which is why a size comparison is not a quality check. How to check a file for NaN covers the detection command and the input pattern that triggers it.
An ID reference breaks after inlining. ID cleanup renames gradient1 to a and updates every reference inside the file, which is correct in isolation. Inline three optimized icons on one page and two of them can end up with a gradient called a; the first one wins and the others render wrong or empty. Keeping ID cleanup off for icons you inline is the simple fix.
The accessible name disappears. removeTitle and removeDesc start enabled, and a screen reader that was announcing the graphic now announces nothing. If the SVG carries meaning rather than decoration, leave those two off.
What optimizing will not fix
Optimizing removes redundancy. It does not make an over-complicated drawing simple. A traced photograph with 4,000 path commands stays expensive after optimization, because every one of those commands is doing something. The fix there is fewer commands, not cleaner ones.
Embedded raster images are the other case. A bitmap pasted into an SVG is base64-encoded inside the file, and the optimizer will not re-compress it. If a file is dominated by an embedded image, look at the image.
And if the file will be served by a normal web server, it is already being gzipped on the wire. Optimization reduces the bytes that get parsed and rendered; compression reduces the bytes that get transferred. They are not substitutes. The batch page covers processing several files at once, and SVG viewBox explains the one attribute people most often delete by accident.
Frequently asked questions
Why does my SVG file get only 1% smaller?
Because it is already optimized. Files from icon libraries such as Simple Icons, Lucide or Material Symbols ship pre-minified: no comments, no editor metadata, and coordinates already rounded. In a test of four library icons the savings were 0.8%, 5.7%, 9.4% and 20.4%. Run the same pass on a file exported from Figma and it dropped 55%. The optimizer is doing the same work either way; there is simply less to remove.
How much smaller will my SVG get?
It depends entirely on how the file was produced. Files exported from design tools carry editor metadata, nested groups, hidden layers and long decimals, so they have the most to lose. Hand-written or library-sourced files have little left. Any tool that promises a fixed percentage is describing its best case, not yours.
Does optimizing an SVG reduce image quality?
Removing comments, metadata and unused definitions does not change the drawing. Rounding coordinates and rewriting paths can, especially on fine details, thin strokes and tight curves. Compare the result at the size it will actually be displayed, not zoomed in, and check anything that reads as a small visual detail.
Are my files uploaded when I optimize them here?
No. Files are read and processed in your browser, and the download is generated locally. The website still loads its own scripts, including analytics and advertising, so local file processing does not mean the whole site makes no network requests.
Should I optimize SVGs that are already minified?
Usually not worth it. If the file came from an icon library, it has probably been through an optimizer already, and you will save a fraction of a percent while taking on the risk of a rounding change. Check the size before and after; if the difference is under 2%, keep the original.
Can optimizing break my SVG?
Yes, in three common ways. An optimizer can return a file whose path coordinates read NaN, which renders blank with no error. ID cleanup can break url(#...) references when several optimized icons are inlined on the same page. Removing title or description elements can strip accessibility text. All three are avoidable by checking the specific switches and inspecting the result.
Do I need to optimize SVG for Core Web Vitals?
It helps, but position matters more than size. Inline SVG is part of the HTML response and delays the largest contentful paint on pages where it is the main element. A referenced file competes for bandwidth like any other asset. Optimizing an already-small 1 KB icon will not move any metric; optimizing a 200 KB illustration might.
Should I use an optimizer or just gzip?
They solve different problems and both apply. Gzip compresses the bytes in transit; an optimizer removes content before it is sent. Since SVG is text with heavy repetition, gzip alone is often substantial, but it cannot remove a path that is not needed. Hosting already applies compression, so what an optimizer changes is the uncompressed size you parse and render.
What is the difference between optimizing and compressing an SVG?
In everyday use the terms overlap. Strictly, optimization restructures the file, removing what the drawing does not need and rewriting what it does into shorter forms. Compression encodes the same content more densely. This tool does the first; your server's gzip or brotli does the second.
Is this free to use?
Yes. No account, no upload, no per-file limit beyond what your browser can hold. The switches, the preview, the copy formats and downloading each result are free.