SVG Optimizer
Strip whitespace and comments from SVG files.
About SVG Optimizer
SVG Optimizer reduces the file size of an SVG by stripping the parts a browser does not need to render it: the XML declaration and DOCTYPE, XML comments, the xmlns:sketch / xmlns:inkscape / xmlns:sodipodi / xmlns:xlink namespaces (and any attributes prefixed with them), and the extra whitespace between elements. The visible result is identical; the file is just smaller.
Worked example: a logo exported from Figma or Inkscape will typically come out a few KB lighter after this pass — the exact saving depends on how much editor metadata the export embedded. SVGs created by hand tend to be compact already; SVGs exported from design tools are where the wins come from, because the export bakes in editor-only namespaces and attributes (layer hints, anchor positions, design-tool state) that the browser ignores.
Two notes about scope. The optimizer is intentionally conservative — it removes editor metadata and whitespace but does not rewrite path data, reduce coordinate precision, merge overlapping shapes, or touch <title> and <desc> elements (those double as accessibility hints and should usually be kept). For more aggressive optimization — precision reduction, path simplification, identifier minification — use SVGO directly with a tuned config. Inline <script> and event handlers are not stripped here; if you are embedding an SVG from an untrusted source, run it through a dedicated sanitizer instead.
Optimization runs entirely in your browser — your SVG is never uploaded, useful when the logo or icon is part of an unannounced project.