Why design tools export larger SVGs
Tools like Figma, Illustrator, and Sketch often include editor-specific namespaces, layer metadata, and coordinate numbers with 6 or more decimal places. Browsers only need the actual shape elements and styles to render the graphic.
Coordinate precision
For most web icons and illustrations, 2 decimal places are plenty. Truncating coordinates from numbers like 142.847192 to 142.85 reduces character count and improves compression under Gzip or Brotli.
Client-side processing
Optimization runs directly in your browser using DOMParser and regular expressions. Your SVG files and code are not uploaded.
Formats, sizes and other limits
runOptimization() parses the file with DOMParser, then walks the tree: optimizeSvgCode() strips the XML declaration, doctype, editor metadata and comments, removes empty groups, and roundCoords() rewrites numeric attributes to a fixed number of decimals by multiplying, rounding and dividing, which is where most of the size reduction comes from on machine-generated files. formatBytes() reports the before and after sizes so the saving is measured, not assumed.
Where it stops working
This is a structural slimmer, not a full optimiser: it does not merge paths, convert shapes to path data, or run anything like SVGO's geometry passes, so the savings are smaller than a dedicated tool would achieve. Rounding coordinates is lossy — at one decimal a small icon may visibly shift — and the preview is a rendering, not a guarantee that every downstream consumer will accept the reduced markup. An SVG that relies on embedded scripts or external references may be reduced into something that no longer works.
Privacy: nothing is uploaded
The SVG is parsed with the browser’s own DOM parser on your device. The file is never uploaded, which matters for client work you are not free to share.
Frequently asked questions
How much smaller will my file get?
Typically 10–30% on editor-exported files, mostly from metadata and coordinate rounding. Machine-optimised files barely change.
Can rounding break my icon?
It can. On a 24-pixel icon, one decimal place is usually safe; on detailed illustrations, reduce precision more cautiously and compare the preview.
Does it merge paths or shapes?
No. That requires geometry analysis; this tool removes what is clearly disposable and rounds numbers.