SVG Optimizer & Cropper
Paste, drop or upload an SVG to shrink it with SVGO and trim the viewBox so the graphic fills its box. See the original, the optimized version and an overlay of both before you download.
What optimizing an SVG actually removes
SVGs exported from Illustrator, Figma, Sketch or Inkscape carry a lot of baggage: editor metadata, comments, unused definitions, default attribute values, IDs nobody references and coordinates written with eight decimal places. None of it affects how the image looks. SVGO walks the document and removes or rewrites those parts, often cutting the file in half. This tool runs SVGO in your browser with a sensible default plugin set that you can adjust per plugin.
Cropping the viewBox
An icon exported from a large artboard often sits in a viewBox with empty space around it, which makes it render smaller than expected and hard to align. Auto-detect bounds measures the visible drawing and tightens the viewBox to it. You can also drag the bounds by hand when you want padding or want to cut part of the image away. Only the viewBox changes, so the paths themselves stay untouched.
Precision and multipass
Float precision controls how many decimals survive in coordinates. Three is safe for almost anything, one or two is fine for icons, and going too low visibly distorts curves, so check the overlay view. Multipass runs the plugins repeatedly until nothing changes, which squeezes out a little more at the cost of a moment longer.
Frequently asked questions
- Will optimizing change how my SVG looks?
- With the default settings, no. The plugins that are on by default only remove things the renderer ignores. Lower precision or aggressive plugins can alter shapes slightly, which is why the overlay view exists.
- Is my SVG uploaded anywhere?
- No. Optimization and cropping run in your browser. The only network request the tool can make is when you paste a URL, in which case the SVG is fetched through a small proxy and not stored.
- Does it work with SVGs that contain CSS or scripts?
- Inline styles are preserved and rendered in the preview. Scripts are stripped from the preview for safety and are removed from the optimized output by the default plugin set.
- What is the difference between cropping and resizing?
- Cropping changes the viewBox, which is the visible window onto the drawing. It does not change any coordinates. Resizing is done by whatever displays the SVG, since vectors scale losslessly.