Open an .svg icon exported straight out of Adobe Illustrator or Inkscape in your code editor and you will find XML prologs, DOCTYPE declarations, RDF metadata blocks, empty nested <g> wrappers, and Bézier coordinates carried out to five decimal places like 28.49981. Inlining twenty unoptimized icons into a page bloats your initial HTML document and triggers React console warnings over hyphenated attributes.

Open SVG Optimizer, Minifier & React JSX Converter
Trim SVG bytes by 40%–70%, toggle currentColor, and copy Minified SVG, JSX, or CSS Data URIs

Where SVG Byte Savings Come From

Cleanup PassWhat Gets StrippedTypical Savings
XML, DOCTYPE & RDF Metadata<?xml...>, comments, editor namespaces25% – 45% on small icons
Coordinate Precision (2 dec)32.00000 → 32, 28.49981 → 28.515% – 30% on complex paths
Empty Groups & WhitespaceNested <g></g> and indentation8% – 15%

The `currentColor` Trick for Effortless Dark Mode Icons

Frequently Asked Questions

Why should I never delete `viewBox` when removing `width` and `height`?

viewBox defines the internal coordinate grid of your vector shapes. Without it, scaling an SVG via CSS crops the graphic instead of resizing it proportionally.

Does rounding to 1 decimal place ever distort small 16×16 icons?

Occasionally on tight circular arcs inside a 0 0 16 16 grid. Sticking to 2 decimals preserves sub-pixel smoothness while capturing almost all file-size wins.