Home Tools About

SVG Optimizer

Paste your inline SVG, get a tighter version with exact byte counts — comments stripped, whitespace collapsed, and your path data left 100% untouched so nothing changes on screen.

Ad space

Optimize an SVG

Optimized


          

Safe minification

Remove the throwaway

Comments, the XML declaration and doctype never render. Stripping them is the first easy win — and the only completely risk-free one.

Collapse whitespace

Most SVGs are formatted for humans. This pass squeezes indentation and blank lines between tags into nothing, without ever touching real attribute values.

Render-safe by design

Path data is left alone — rewriting commands can silently break icons. You get a real size drop with zero visual risk.

SVG optimizer FAQ

Will the optimized SVG render identically?

Yes. Only comments, the XML/doctype header and inter-tag whitespace are removed, and attribute values are never altered — the output draws exactly like the input.

Why is path data not compressed?

Compressing path commands (e.g. dropping decimals, collapsing separators) requires re-validating each shape to avoid subtle distortion. This tool stays conservative so there is zero risk of a changed icon.

Where should I use the output?

Inline in HTML or a web component, embedded as a background-image data URI, or in an icon font build. With whitespace gone, pages weigh less and paste-time is unbeatable.