LazyTools

🔒 Every tool runs in your browser — the files and values you enter are never uploaded to any server. How it works

🧹 SVG Optimizer & Minifier

Paste or open an SVG and get a smaller, cleaner version — editor junk, comments and metadata removed and whitespace collapsed, with the image unchanged.

353 → 138 bytes · saved 60.9%

Rate this tool:
Anonymous — no account, no identifier

How the svg optimizer & minifier works

The optimizer strips the parts of an SVG that don't affect rendering but bloat the file: the XML declaration and DOCTYPE, comments, <metadata>/<title>/<desc> blocks, and the editor-specific elements and attributes that Illustrator, Inkscape and Figma add (inkscape:, sodipodi: namespaces and the like). It then collapses the whitespace between and inside tags. You can optionally round coordinate numbers to fewer decimals for extra savings. It deliberately does not restructure paths or merge shapes, so the visible image is identical.

Editor exports are often 2–5× larger than they need to be, mostly from metadata and needless precision — this trims that safely, which matters when SVGs are inlined into HTML/CSS or shipped in an icon set. The conservative default (no coordinate rounding) guarantees a pixel-identical result; rounding to 2–3 decimals usually saves more with no visible change, but check the preview on very small or very precise artwork. For heavy path-level optimization, a full SVGO pipeline goes further; this covers the safe 80%. Everything runs in your browser — your artwork is never uploaded.

Frequently asked questions

How do I minify an SVG?

Paste or open the SVG and the tool removes comments, metadata and editor cruft and collapses whitespace, giving a smaller file with the same appearance. Copy or download the result, and see the bytes saved.

Will optimizing change how my SVG looks?

No — with the default settings it only removes non-visual data (metadata, comments, editor attributes) and whitespace, so the rendered image is identical. Optional coordinate rounding can save more; it's off by default to guarantee no change.

What is all that inkscape: and sodipodi: stuff?

Editor-specific bookkeeping that Inkscape (and similarly Illustrator/Figma) embed — canvas guides, layer labels, versions. Browsers ignore it, so removing it shrinks the file with no downside.

Is this the same as SVGO?

It does the safe, high-value part of what SVGO does — stripping metadata and whitespace — without SVGO's deeper path rewriting. That keeps results predictable and pixel-identical; for maximum compression a full SVGO run can go further.

Is my SVG uploaded?

No — optimization runs entirely in your browser and works offline, so your artwork never leaves your device.

Related file converters

From the blog