DevKits

SVG Optimizer — SVGO in Your Browser (No Upload)

Optimize SVG files with SVGO — remove comments, metadata, unused precision, and Illustrator/Inkscape junk. Preserves viewBox by default. Runs entirely in your browser.

Last updated:

Options

Paste or drop an SVG to get an optimized copy — smaller, cleaner, with Illustrator/Inkscape junk removed. Powered by SVGO in your browser.

What is SVG Optimizer?

SVGs exported from Illustrator, Inkscape, Figma, and Sketch typically ship with a lot of extra baggage: XML comments, metadata blocks, unused namespaces, floating-point coordinates with 8 digits of precision. Cutting the fat can shrink SVGs by 30-70% without changing how they render. This tool runs SVGO — the de facto standard SVG optimizer — as the browser bundle, so you get the same output as the command-line tool without leaving your browser.

How to optimize an SVG

  1. 1Paste SVG source into the left pane, or drop an .svg file anywhere on the page.
  2. 2Adjust options: keep or remove comments/metadata, keep or drop width/height, set coordinate precision.
  3. 3Click 'Optimize'. The result and size delta appear in the right pane.
  4. 4Copy or download.

Use Cases

Web performance

Cut hero-illustration SVGs by 40% before shipping.

Icon libraries

Batch-clean designer-exported icons before checking them into your component library.

Reduce diff noise

Normalized precision + no metadata = cleaner git diffs when a designer updates an icon.

Tips & Best Practices

  • Always keep viewBox — this tool disables the SVGO 'removeViewBox' plugin by default because removing it breaks responsive SVGs.
  • 'Remove width/height' plus preserved viewBox gives you a fully responsive SVG that scales to its container.
  • Precision 3 is a great default. Drop to 2 for icons; keep at 4-5 for illustrations with fine detail.

Frequently Asked Questions

How is this different from SVGO on the command line?

Same library, browser build. You paste or drop a file and get the optimized SVG back instantly with a size delta. No install, no upload.

Why is 'remove viewBox' not offered?

Removing viewBox is a common SVGO trap — the SVG becomes non-scalable and breaks in most usage. This tool always keeps viewBox.

What does 'remove width/height' do?

Strips the width/height attributes so the SVG scales to whatever container you place it in. Combined with viewBox, this is the modern responsive SVG pattern.

Is my SVG uploaded?

No. The optimizer runs in your browser via the SVGO browser bundle.

Related Tools