What “optimize SVG” usually means — and what this tool actually does#
Search results for “svg optimizer online” and “svg compressor online” mix two very different jobs. Aggressive optimizers (SVGO-style pipelines) rewrite path data, merge shapes, inline styles, strip unused IDs and gradients, and can change how the graphic renders if a pass is too eager. This tool deliberately stays on the safe side: it minifies markup the way a careful hand edit would — remove comments authors left behind, collapse insignificant whitespace between tags, drop a known-safe set of unused or default attributes, shorten colors when the value is equivalent (#ff0000 → #f00, rgb(0,0,0) → #000), and delete empty <g> wrappers that draw nothing.
That is usually enough for CMS exports, icon packs from design tools, and hand-written SVG that grew comments and indentation. If you need path-data compression or shape merging, keep a dedicated SVGO/CLI step in your build; use this page when you want a free, instant “svg minify online” pass without installing anything or uploading assets.
Safe attribute removals (and what we refuse to touch)#
“Remove unused attributes” here is not a full dependency analysis of url(#id) references. A true unused-ID pass needs a graph of fills, strokes, clip-paths, masks, and <use> hrefs — getting it wrong invisibly breaks the icon. The safe set is narrow on purpose: empty attributes (fill=""), SVG root noise like version / baseProfile / enable-background, xml:space="default", default opacities (opacity="1" and friends), and editor namespaces from Inkscape/Sodipodi/Sketch (inkscape:*, sodipodi:*, …). Your xmlns, viewBox, geometry, and presentation attributes stay put.
Whitespace collapse skips significant text containers — <text>, <tspan>, <textPath>, plus <title>, <desc>, <style>, <script>, and <foreignObject> — so label spacing and embedded CSS/JS are not flattened into a single run-on string. Structural tags between shapes collapse to ><, which is where most of the byte savings come from on pretty-printed exports.
Colors, empty groups, and documented limits#
Color shortening only rewrites values that stay visually identical in sRGB: six-digit hex that collapses to three digits, eight-digit hex that collapses to four, and simple rgb() / rgba() with integer channels. Named CSS colors and hsl() are left alone to avoid surprising palette changes. Empty <g> removal is iterative so nested empty wrappers disappear in one optimize pass.
Limits to keep in mind: this is not a path optimizer — d attributes are not rewritten, arcs are not converted, and duplicate path segments are not merged. Stylesheets are not inlined into attributes; unused gradients and filters are not pruned; XML declarations and DOCTYPE lines are left as-is unless you delete them yourself. Treat the before/after byte meter as the source of truth for how much this safe pass bought you, then run a heavier SVGO profile offline if you still need more.
Why browser-side minify beats “upload your logo” compressors#
SVG often embeds product UI, brand marks, and sometimes even text that should not transit a third-party server. Every option on this page runs locally with a lightweight custom minifier — no CDN SVGO dependency, no account, no file stored after you close the tab. Upload is only a convenience to fill the same textarea you could paste into; the bytes never leave the page.
Pair this with gzip/Brotli on the wire: minified SVG still compresses well, and removing repeated indentation often helps more than people expect because pretty-printed exports repeat the same spaces on every line. For icons used as inline HTML, smaller markup also means less DOM parse work on first paint.