Developer Tools
SVG optimizer.
Shrink an SVG with SVGO, the standard open-source optimizer. Choose what to strip, see the exact bytes saved, and compare the original and optimized drawings side by side. Your file never leaves the browser.
Input & options
Result
Open or paste an SVG, then press Optimize.
How it works
The page loads the SVGO 4.1.0 browser build (MIT licence) from jsDelivr and calls optimize() on your markup with the preset-default plugin set. Your toggles map to SVGO settings: the metadata switch disables removeDoctype, removeXMLProcInst, removeComments, removeMetadata and removeEditorsNSData when off; precision is SVGO's floatPrecision (default 3); keeping the viewBox simply leaves out the removeViewBox plugin, which is not part of the default preset; the title switch adds removeTitle.
Savings are (original bytes − optimized bytes) ÷ original bytes, with bytes counted as UTF-8. The visual diff draws both versions to canvases at the same size and counts pixels whose RGBA values differ by more than 8 per channel (out of 255).
Worked example: an Inkscape-style 48×48 icon (circle plus check mark, with a sodipodi:namedview, RDF metadata, a creator comment and six-decimal coordinates) is 962 bytes. With default options SVGO 4.1.0 outputs 302 bytes, a 68.6% saving. At precision 1 it is 286 bytes (70.3%); at precision 0 it is 276 bytes (71.3%), but the circle radius 20.5 rounds to 21, a visible change, which is why precision 0 is a trade-off rather than a free win. Use Load sample to reproduce these numbers.
Sources, read 2026-09-30: SVGO on GitHub (MIT), preset-default plugin list, convertPathData / floatPrecision, svgo on npm (version 4.1.0). Savings depend on the file; the figures above are for that example only.
Frequently asked questions
Is my SVG uploaded anywhere?
No. The file is read with the browser's FileReader and optimized in a script on this page. The only network request is the one-time download of the SVGO library itself from jsDelivr.
Why keep the viewBox?
Without a viewBox an SVG with fixed width and height cannot scale to its container. SVGO 4 keeps it by default; only turn this off if you know the file is always shown at its intrinsic size.
Will optimizing change how my graphic looks?
With default options it should not, and the pixel diff shows any difference. Lower precision, removing the title, or removing IDs that scripts or CSS reference can change appearance or behaviour, so check the diff before shipping.
Does it handle SVGs with scripts?
The preview renders through an image element, which never runs scripts inside the SVG. SVGO does not remove scripts by default; remove them yourself if the file comes from an untrusted source.
Processed entirely in your browser
Your SVG is optimized locally and is never sent to a server. Always review the result before replacing the original file.