SVG Minifier
Minifies SVG code to the smallest version that draws the same.
Clean up SVG files exported from Figma, Illustrator, Inkscape, or Sketch. The SVG optimizer removes editor data, rounds long numbers, and rewrites paths shorter, while the drawing looks the same.
Runs as you type for files up to 100 KB.
The tool runs SVGO, the standard open-source SVG optimizer, in your browser with its default set of safe plugins. Among other things it:
64.000000 becomes 64);#ffffff becomes #fff);The viewBox is never removed, so the icon still scales, and <title> stays for screen readers. Previews are shown as images, so any script inside the file never runs.
The sample is a 64 × 64 icon saved by Inkscape, 2,089 bytes long:
M 0.00000000,46.000000 C 10.500000,38.250000 ... to M0 46c10.5-7.75 18.75-8.5 28-3....sodipodi:namedview, <metadata>, and inkscape: attributes were removed.| Tool | What it does | Use it when |
|---|---|---|
| SVG Optimizer | All safe optimizations, readable output if you like | You want a smaller file you can still edit |
| SVG Minifier | The same plus shortest ids and no whitespace | The file goes straight onto a website |
| SVG Metadata Remover | Removes only editor data and comments | You must not change the drawing code |
Not with the default settings. The safe plugins keep the drawing the same. Very low precision (1 decimal place) can shift fine curves slightly, so check the preview.
The viewBox lets an SVG scale to any size in CSS. Without it an icon only works at its original width and height, so this tool never removes it.
SVGO (SVG Optimizer) is the widely used open-source tool behind most SVG compressors and build tools. This page runs the same code in your browser.
Files exported from design apps often shrink by 30 to 70 percent. Hand-written or already optimized files shrink much less.
Often used together with the SVG Optimizer.
Minifies SVG code to the smallest version that draws the same.
Strips editor data, comments, and metadata from SVG files and leaves the drawing alone.
Checks SVG files for XML errors, broken references, typos, and unsafe code.