SVGSketch Feature

SVG Optimizer Online: Minify and Clean Up SVG

Optimize SVG in the browser: SVGO at export, precision rounding, deduplicated gradients and no pretty-printing. On 115 real files the median loses 19%.

Open the Export panel

Quick answer

Open the SVG in SVGSketch, open the Export panel, and in the SVG settings turn on "Optimize with SVGO", set Precision to 2 or 3 decimals and clear "Pretty-print output". Download the result. Over 115 real-world SVGs the median file shrank 19%, 26% with pretty-printing off, and 7 grew, which is explained below. Nothing is uploaded.

SVG file sizes before and after optimization

SVG FILE SIZEScoverage_filters.svgBefore8,945 bytesAfter7,228 bytes19% smaller. Across 115 real-world files the median is 19%.
Compare SVG file sizes after optimization Measured, not estimated: the editor’s own SVGO settings run over 115 real-world SVGs. The median file loses 19%; a quarter lose less than 8%.
INDENTATION AND FILE SIZEAmpel_animiert_css.svgBefore2,071 bytesSVGO + Pretty-print2,362 bytesSVGO alone2,070 bytes
When optimizing makes a file bigger Pretty-print output is on by default, so a file that arrived minified gets its indentation back and ends up larger. 7 of 115 corpus files do. Clear that checkbox and the median saving rises to 26%.
The SVG export settings dialog with Optimize with SVGO switched on and its plugin toggles showing
The SVG export settings Precision, pretty-printing, deduplication and "Optimize with SVGO" with its fourteen plugin toggles, as the Export panel shows them for an SVG item.

What the optimizer changes

SVGO runs on the bytes leaving the editor, never on the document you keep editing, so you can re-export at other settings any time. With "Optimize with SVGO" on, the SVG settings show fourteen plugin toggles, all on by default: ids cleaned up; the doctype, comments, empty attributes, empty containers, unused namespace declarations, hidden elements and empty text removed; groups collapsed; path data shortened; transforms optimized; paths merged; useless strokes and fills removed; and numbers cleaned up. A path whose corners were shaped in SVGSketch keeps the corner construction data "Include metadata" writes, and SVGO only re-spells its path data, leaving every point where it was, so the corners are still editable when the file is reopened in SVGSketch.

Precision rounds every coordinate to the decimals you set, which is where most of the saving in a drawing-tool export lives: "M127.87349832 482.10283745" becomes "M127.87 482.1". "Deduplicate identical gradients and patterns" collapses paint definitions a source tool wrote once per shape.

Disable indentation to reduce file size

"Pretty-print output" is on by default because indented markup is the right thing to read and commit. It is the wrong thing for a file that only needs to be small: clearing it takes the median saving from 19% to 26% on the same files.

Numbers from real files

The two cards above are measured, not illustrated. Running the editor's own SVGO configuration over 115 real-world SVGs, the corpus SVGSketch uses for import regression testing, the median file lost 19%; a quarter lost 8% or less and a quarter lost 34% or more. 7 files grew: they arrived minified, and pretty-printing them again costs more than the optimizer saves.

Files from drawing applications have the most to lose. Across the 16 Illustrator, Inkscape and Sketch files in the same corpus the median saving was 36% and the best 87%.

Reduce path complexity

SVGO rewrites how geometry is spelled, and it drops a point only where the path draws the same without it, such as a node partway along a straight horizontal or vertical run. A path from the vectorizer or a freehand stroke may carry far more nodes than its silhouette needs. Select it and run Shape > Simplify Path (Ctrl+Alt+Shift+[), which drops nodes within a tolerance you set, or Shape > Smooth Path (Ctrl+Alt+Shift+S) to refit a stair-stepped trace. Delete unused definitions in the Elements panel, and ungroup single-child wrappers with Object > Ungroup (Ctrl+Shift+G).

Check the result

Open the exported file next to the original in a browser and compare. The plugins change how the markup is written, not what it draws, and a precision of two or three decimals is finer than a screen shows, so the two should match; if a filter or a gradient looks different, turn that plugin off and export again. The Export panel reports no before-and-after size, so compare the files in your file manager or shell.

FAQ

Does optimizing change how the SVG looks?

Not at the default settings. The SVGO plugins rewrite the markup without changing what it draws, and two or three decimals of precision is finer than any screen resolves. Compare the export with the original in a browser before you ship it; any plugin can be switched off.

Why did my SVG get bigger?

It arrived minified, and "Pretty-print output" is on by default, so the export writes the indentation back. Clear it for the smallest file. The measurements above include the files this happened to.

Is the optimizer free?

Yes. "Optimize with SVGO", its plugin toggles, Precision, deduplication and the pretty-print switch are all part of the free SVG export. Exporting every item as a ZIP at once is Pro.

Can I optimize many files at once?

Add each file as an export item in the Export panel and download them one by one, or as a ZIP with Pro. For a script or a build pipeline, the command line tool converts and renders files without a browser.

Open your SVG in SVGSketch

Start with a blank canvas, import an SVG, or use the editor as a conversion and cleanup step.

Open the Export panel