SVG Minifier

Shrink SVGs by stripping editor metadata, default attributes, and whitespace — free, no signup required.

Input SVG
Minified Output
Original: 0 BMinified: 0 BSaved: 0.0%

SVG Full Form

SVG stands for Scalable Vector Graphics — an XML-based image format for two-dimensional graphics that scales infinitely without losing quality. SVG files exported from design tools (Figma, Illustrator, Inkscape) are typically bloated with editor metadata, default attributes, and whitespace. Stripping those gives you a smaller file that renders identically in every browser.

What this tool does

  • Drop editor metadata — Removes <metadata>, <title>, <desc>, and namespaces like xmlns:sodipodi, xmlns:inkscape, xmlns:sketch.
  • Drop XML prolog & doctype — Removes <?xml ...?> and <!DOCTYPE svg ...> — safe when embedding SVG inline in HTML (the common case).
  • Drop default attributes — Removes version="1.1" (the default when unspecified).
  • Strip comments — Removes <!-- ... -->.
  • Collapse whitespace — Between tags and inside text nodes.
  • Byte savings — See original vs minified byte counts and percentage saved.

When you need an SVG minifier

  • Inline SVG icons — When embedding SVGs directly in HTML for fast render (no extra HTTP request), small files matter.
  • Icon sprite sheets — A sprite of 50 icons at 1.2KB each is 60KB; minified they might be 25KB.
  • React/Vue components — SVGs imported as components in your bundle add to your JS payload.
  • CSS background images — Data-URL-encoded SVG backgrounds in CSS benefit enormously from minification.

Privacy

Everything runs locally in your browser. Your SVG is never sent to our servers. You can minify unreleased logos, private design tokens, or client artwork without them leaving your machine.

Frequently Asked Questions

Yes, for inline-HTML, CSS, and React/Vue component usage — the common cases. The tool strips the XML prolog and doctype, which are only needed for standalone .svg files served with image/svg+xml Content-Type. If you're saving the minified result as a standalone file to serve directly, paste the result back and manually add <?xml version="1.0" encoding="UTF-8"?> at the top.
Yes. <title> and <desc> are stripped because they're editor-generated in exports, not accessibility text. For accessible inline SVG, add an aria-label or role="img" with a <title> deliberately on the consuming side — don't rely on whatever a design tool exported.
No. All rendering-relevant attributes (viewBox, width, height, fill, stroke, d, points, transforms) and the element tree are preserved byte-for-byte.
SVGs exported from Figma or Illustrator typically shrink by 30–70% depending on how much editor metadata is embedded. Hand-written SVGs save 10–20%. After gzip the wire savings are smaller but real.
For a one-off minify — this tool, in seconds. For deeper optimization — path simplification, precision reduction, shape-to-path conversion — use SVGO. This tool is the 80% solution that runs in your browser without installing anything.
No. All minification happens in your browser. Nothing is sent to our servers, logged, or cached anywhere except the current browser tab.