SVG Optimizer
Shrinks SVG files with SVGO and shows the before and after side by side.
Minify SVG code for production: every safe optimization, the shortest ids, sorted attributes, and no whitespace. Paste the code or drop a file and get the smallest version that draws the same.
Runs as you type for files up to 100 KB.
The minifier runs SVGO with the default safe plugins and always uses multiple passes. On top of the optimizer's work it:
sky becomes a) and updates every reference to them;Nothing that changes the drawing is turned on: the viewBox, title, and shape order stay.
sky becomes a, and fill:url(#sky) becomes fill:url(#a).<rect width="64.000000" x="0.000000"> loses the zeros and the default x: <rect width="64">.Minifying removes characters. Gzip or Brotli on your web server then compresses what is left, and the two savings add up. For SVG placed inline in HTML or in a CSS url(), minifying is the only saving you get, so it matters even more.
Optimizing makes the code shorter while it can stay readable. Minifying goes further: one line, shortest ids, and sorted attributes, for files that only a browser will read.
Yes. It is the same SVG with less text. Browsers, design apps, and the SVG Validator read it normally.
Formatting can be restored with the SVG Formatter, but removed comments, editor data, and original id names are gone. Keep the source file.
Yes. Inline SVG is part of the page, so every byte you remove makes the HTML smaller.
Often used together with the SVG Minifier.
Shrinks SVG files with SVGO and shows the before and after side by side.
Indents SVG code for reading and editing without changing any values.
Minifies CSS and shows the size saving, raw and gzipped.