svg→svg

SVG optimizer

Strip editor bloat and round coordinates, without changing what the file draws.

By opening this website or using its tools, you agree to our Terms and Privacy Policy.

or drag it here

SVG file

Network activity during processing
0 bytes uploaded

Your file never leaves your browser during processing

How it works

To optimize an SVG, drop the file onto this page — editor metadata, comments, unused ids, and excess decimal places are removed in your browser, and the before and after previews are shown side by side so you can confirm the drawing is unchanged.

An SVG exported from a design tool is usually two files in one: the drawing, and everything the editor wrote down about the drawing. Inkscape stores its own namespaced attributes and a namedview element describing the window you had open. Illustrator adds a generator comment and a metadata block. Figma leaves ids on every layer. None of it affects rendering, and on a small icon it can easily be most of the file.

The other half of the weight is numbers. Path data is typically the largest part of an SVG, and exporters write coordinates at full floating-point precision — 12.703124999999998 where 12.7 draws the same line. Rounding to two decimals is invisible at any normal display size and often removes a third of the file. The precision slider goes down to zero for the cases where it helps, but zero can visibly distort small icons, which is why it is not the default.

What this tool does not do is as deliberate as what it does. Merging paths, converting shapes to paths, and collapsing groups that carry transforms are all things a more aggressive optimizer will offer, and they are also where files quietly break — a group collapse that misplaces a transform produces a drawing that is subtly wrong rather than obviously broken. Every rule here is safe on a file it has never seen before, and the before/after previews let you verify that on yours rather than take it on trust.

Ids are only removed when nothing references them, checked against url(#id) references, href targets, and selectors inside style blocks — so gradients, clip paths, and filters keep working.

FAQ

Will optimizing change how my SVG looks?

It should not. Every rule here removes data that does not affect rendering, or rounds coordinates to a precision you choose. The two previews are rendered from the original and the optimized file so you can compare them directly.

How much smaller will my file get?

It depends entirely on the exporter. A hand-written icon may be near its minimum already; a design-tool export with metadata and full-precision coordinates commonly drops by half or more. The exact figure is shown after processing.

What does "remove width and height" do?

It deletes the fixed size attributes and keeps the viewBox, so the SVG scales to whatever container it is placed in. Useful for responsive layouts, unwanted if you rely on the file having an intrinsic size.

Is this the same as SVGO?

It is a conservative subset. SVGO offers more aggressive plugins — path merging, shape conversion, group collapsing — which give bigger savings and carry a real risk of changing the drawing. Those are intentionally not implemented here.

Does the file get uploaded?

No. The SVG is parsed and rewritten in your browser. The network monitor under the tool confirms no data is sent while it is processed.

Related tools