SVG Optimizer
Shrink an SVG by rounding coordinates and dropping editor junk.
Everything runs inside your browser. Your files never leave your device.
Input
Result
Ask about SVG Optimizer
Questions about what this tool does, which option to pick, or what it can and cannot handle.
The question you type here is sent to an AI provider to be answered — your files and whatever you put in the tool above are not, and the assistant cannot see them. Answers are generated and can be wrong. The tool itself is not guessing: it runs deterministic code on your device.
About the SVG Optimizer
An SVG exported from a design application carries a great deal that a browser never renders. Editor namespaces recording which layer was selected, a metadata block naming the software, coordinates carried to fourteen decimal places when the artwork is 24 pixels wide. On a single icon that is a few kilobytes of waste; across an icon set inlined into a page, it is real weight on every load.
This strips it. Comments and editor metadata go, coordinates are rounded to a precision you choose, and whitespace between elements is collapsed. Byte counts before and after sit above the result, because the honest answer for an already-clean file is that there was nothing much to take out.
Precision is the setting that matters and the one that can go wrong. Two decimal places is safe for essentially all artwork — a coordinate moving by a hundredth of a pixel is not visible on any display. One decimal place starts to shift things by amounts the eye can catch on curves and hairline strokes. Zero rounds to whole pixels, which can look deliberate on a grid-aligned icon and destroys anything organic. The tool also drops the leading zero from decimals, since a path command reads a value beginning with a full stop identically and it saves a byte every time.
Unused id removal is off by default and careful when switched on. An id referenced by url(#gradient), by an href, or by an animation target is load-bearing: removing it silently breaks the gradient, the clip path or the animation. The tool collects every reference in the document first and only removes ids that nothing points at.
For a full pipeline, SVGO does considerably more — merging paths, converting shapes, cleaning up transforms. This covers the wins that are safe to apply without inspecting the result, in a page you do not have to install.
How to use it
- 1Paste the contents of the SVG file, starting at the opening svg tag.
- 2Set the decimal precision. Two is safe for nearly everything; go lower only after checking the result.
- 3Leave comment and metadata removal on. Switch on unused id removal if the file has been through several editors.
- 4Compare the before and after sizes, then check the optimised artwork renders identically before replacing the original.
Questions
- Will this change how the image looks?
- Rounding moves coordinates very slightly, so at two decimal places the answer is effectively no. At one or zero, curves and thin strokes can shift visibly. Always view the result at the size it will be used before replacing the original.
- Is it safe to remove ids?
- Only unused ones, which is what the option does. Every id referenced by a gradient fill, a clip path, an href or an animation is collected first and kept. Anything nothing points at is dead weight.
- How much smaller should I expect the file to be?
- Editor exports commonly drop 30 to 60 per cent, mostly from metadata and excess coordinate precision. A file already through an optimiser will barely move, which the size comparison will tell you immediately.
- How does this compare to SVGO?
- SVGO does more: merging paths, converting shapes to paths, collapsing transform chains. This applies the subset that is safe without reviewing every change, and it runs in a browser tab rather than a build step.

