SVG Minifier & Cleaner
Remove comments, metadata, editor junk, and unnecessary attributes. Shrink SVG file size without changing the visual output.
Advertisement
SVG preview will appear here
Advertisement
How SVG Minification Works
SVG files exported from design tools (Illustrator, Figma, Inkscape) contain many redundant elements: editor-specific metadata, XML comments, unused namespace declarations, and inflated decimal precision. This tool strips all of that without touching the actual paths, shapes, or visual content.
- Remove comments — XML comments (
<!-- ... -->) add no visual value and can expose design notes. - Remove <metadata> — Editor metadata blocks can be kilobytes of wasted space.
- Strip editor attributes — Removes
inkscape:,sodipodi:,sketch:, anddata-nameattributes added by editors. - Collapse whitespace — Removes unnecessary newlines, tabs, and extra spaces.
- Round decimals — Rounds floating-point coordinates to 2 decimal places (optional — only enable if visual accuracy allows).
Advertisement
Advertisement
Tips for Smaller SVGs
- Export at a reasonable precision — most SVGs don't need more than 2–3 decimal places.
- Combine overlapping paths in your design tool before exporting.
- Use
<use>to reuse repeated shapes instead of duplicating path data. - Serve SVGs gzip-compressed from your server for an additional 60–80% size reduction.
Advertisement