SVG

SVG Optimizer

Optimize an offline SVG subset with SVGO and compare actual bytes

Vector Tools
πŸ”’ 100% client-side β€” your data never leaves this page
Maintained by Evanβ€’Updated: September 30, 2026
SVG

The offline static subset removes active content and nonlocal resources; styles may change. Removing dimensions keeps the viewBox.

Optimized result

Optimized markup, preview, and byte savings will appear here.

About this tool

Optimize pasted SVG or a local file up to 2 MB with SVGO. Numeric precision accepts 0–6 decimals; multiple passes are optional. Keeping viewBox preserves its scaling coordinates. Disabling that option allows removal only when it matches fixed dimensions; removing width/height instead keeps or derives a viewBox. Before optimization, the tool applies a limited offline subset: scripts, event handlers, foreignObject, animation, foreign-namespace elements, nonlocal links, and some resource-bearing styles are removed. Same-document references and embedded PNG/JPEG/WebP images can remain. Preview loads the result as an image, not inline page markup. This is not a general security sanitizer for using the download elsewhere. Filters, styles, IDs, precision changes and missing resources can affect appearance; compare the result in its target layout. Byte counts use the submitted source and completed UTF-8 output, including increases. Editing input or options invalidates the previous result. Source and settings are not saved, and processing does not upload the source.

Scenario Recipes

01

Prepare an exported icon for a production bundle

Goal: Reduce transfer size without breaking responsive rendering

  1. Paste the exported SVG, keep viewBox enabled, and start with three-decimal multipass optimization.
  2. Compare before and after byte counts and inspect the rendered preview at several sizes.
  3. Test CSS classes, IDs, masks and any resource-cleanup differences in the target app before replacing the source asset.

Result: An optimized SVG with measured byte change and a separate visual and integration check.

Frequently Asked Questions

What SVG input is supported?

Paste SVG markup or open a file up to 2 MB. Invalid XML, a non-SVG root, DOCTYPE and entity declarations are rejected.

How do viewBox and dimension options interact?

Keep viewBox preserves it. When disabled, SVGO may remove a viewBox matching fixed dimensions. Remove width/height keeps or derives viewBox so the output can scale.

What does precision change?

Choose an integer from 0 to 6 for numeric rounding. Lower precision can change geometry; compare detailed artwork before replacing it.

Is the output a fully sanitized SVG?

No. A limited offline subset removes active features and some resource references, while image-mode preview provides separate browser restrictions. Review the file before embedding it elsewhere.

Can the output grow?

Yes. The report shows actual UTF-8 bytes and either growth or savings. A smaller file is not guaranteed.

Are inputs stored or uploaded?

No source or settings are saved. Processing, preview and downloads happen in the browser; copying or downloading creates a copy you control.

Keep browsing