SVG Optimizer
Strip comments, defaults and excess whitespace from SVG markup.
Paste any SVG and the optimizer removes comments, XML declarations, doctypes, redundant whitespace, and default-valued attributes (like fill-opacity="1"). Numeric values are rounded to two decimals for smaller files. Live size comparison shows you the savings.
Common use cases
- Trim icon files exported from Figma or Illustrator before shipping
- Reduce critical CSS / inline SVG payload for above-the-fold pages
- Clean up icons before pasting them into React components
- Slim down hero illustrations on landing pages for better Lighthouse scores
Frequently asked questions
Does it preserve animations and CSS?▾
Yes — `<style>`, `<animate>`, `<animateTransform>` and other dynamic elements are kept. Only redundant attributes and whitespace are removed.
Is this as aggressive as SVGO?▾
It's a focused subset that handles the most impactful wins (whitespace, defaults, number rounding) without breaking complex SVGs. For maximum compression, use SVGO with a custom config.
Will rounding break my icon?▾
Two-decimal precision is well within the tolerance of any practical SVG icon. If you need pixel-perfect path data, skip the rounding.
Related tools
🖼️
Image Format Converter (PNG ↔ JPG ↔ WEBP)
Convert images between PNG, JPG and WEBP entirely in your browser.
🗜️
Image Compressor
Reduce image file size with adjustable quality, preview before saving.
📐
Image Resizer
Resize images to exact pixel dimensions or by percentage.
🔁
Image to Base64
Encode an image as a Base64 data URI for inline embedding.