SVG Minifier

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

Input SVG
Minified Output
Original: 0 B Minified: 0 B Saved: 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

When you need an SVG minifier

How to use it

  1. Open the SVG in a text editor and paste its code into Input SVG, or click Upload File and pick the .svg file directly. Load Sample shows a typical Inkscape export.
  2. The cleaned markup appears on the right as you type. Click Minify to refresh it.
  3. Check the stats line for the size saved.
  4. Click Copy to paste the result into your HTML, CSS or component, or Download to save it as minified.svg.

A worked example

A 24 by 24 home icon saved from a design tool, 261 bytes:

<?xml version="1.0" encoding="UTF-8"?> <!-- Generator: design tool --> <svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="24" height="24" viewBox="0 0 24 24"> <title>Home</title> <path d="M12 3l9 9h-3v9h-5v-6h-2v6H6v-9H3z" fill="#3366cc"/> </svg>

After minifying it is 149 bytes, about 43% smaller:

<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M12 3l9 9h-3v9h-5v-6h-2v6H6v-9H3z" fill="#3366cc"/></svg>

The prolog, the comment, the title and version="1.1" are gone. The xmlns declaration stays, because a standalone SVG file needs it, and the path data is untouched, so the icon looks exactly the same.

What it does not do

This is a cleanup tool, not a geometry optimiser. It never rounds coordinates, merges paths, converts shapes, or removes unused <defs>, IDs and gradients. Path data that a tool exported with six decimal places keeps all six. If the file is still large after minifying, the bytes are in the drawing itself, and simplifying the artwork in your editor or using a dedicated optimiser such as SVGO will help more.

Common snags

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

Will the SVG still render correctly?
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 the XML prolog at the top.
What about accessibility - do I lose title text?
Yes. <title> and <desc> are stripped because they are 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 - do not rely on whatever a design tool exported.
Does this affect viewBox, fill, or path data?
No. All rendering-relevant attributes (viewBox, width, height, fill, stroke, d, points, transforms) and the element tree are preserved byte-for-byte.
How much can I realistically save?
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.
Should I use this or SVGO?
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.
Is my SVG uploaded anywhere?
No. All minification happens in your browser. Nothing is sent to our servers, logged, or cached anywhere except the current browser tab.