SVG Optimizer: Compress & Clean Figma SVG Exports

SVG Optimizer: Compress & Clean Figma SVG Exports

Shrink SVGs from Figma, Illustrator and Inkscape in your browser: strip metadata, comments and unused IDs, round coordinates and compare before and after.

Updated November 2026

Reviewed by Rafael Duarte

or paste code below

Optimization Level

Cleaning Options

Prettify Code

Readable indented output

Path Precision

2 dp

Lower precision results in smaller files but may distort complex shapes.

PRO TIP

For logos, start with 'Balanced' and check the Preview. 'Aggressive' only lowers precision to 1 decimal, which can distort small curves. If external CSS or JS targets IDs, use 'Safe' to keep them.

Your SVG files are never uploaded. All optimization runs entirely in your browser.

Lighter Files

Removes editor metadata, comments, and redundant elements without changing the visual output.

Configurable Presets

Choose Safe, Balanced, or Aggressive optimization — or tune individual options manually.

100% Private

No upload to any server. Your SVG files never leave your device.

How to optimize an SVG file online

Compress a bloated Figma or Illustrator export into a clean, production-ready SVG

1. Paste or upload your SVG

Drag in an .svg or .xml file, click to browse, or paste the code straight into the text area. The tool handles one file at a time.

2. Pick an optimization level

Choose Safe, Balanced (the default) or Aggressive, then fine-tune any individual option on top of the preset.

3. Compare and export

Use Preview or Compare to confirm nothing changed visually, then hit Export .svg or Optimize & Copy.

What this SVG optimizer does

The essential cleanup to compress a Figma SVG export, running entirely in your browser

Strips design-tool overhead

Figma, Illustrator, Inkscape, Sodipodi and Sketch namespaces and attributes, the <metadata> block, comments, the <?xml?> declaration and layer IDs nothing references. Note that Remove Metadata also deletes <title> and <desc>.

Rounds coordinate precision

With Minify Paths on, d="M15.123456 32.678901" becomes d="M15.12 32.68" on Balanced. Rounding applies to d, x, y, cx, cy, r, rx, ry, viewBox and transform, from 0 to 6 decimal places.

Before/after preview

See the original size, the optimized size and the reduction in %, plus a drag-to-compare slider, before you export anything.

Never removes the viewBox

It's essential for responsive scaling, so it stays under every preset. One caveat: with Minify Paths on, its numbers are rounded too (at 0 decimal places, 24.5 becomes 25).

Safe vs. Balanced vs. Aggressive

Pick a preset based on how much the file can shrink before it matters

Preset
What it does
Safe
Strips comments and metadata (including <title> and <desc>), keeps every ID, no coordinate rounding
Balanced (recommended)
+ removes unused IDs, rounds to 2 decimal places
Aggressive
Rounds to 1 decimal place; avoid it on detailed illustrations

When you'll reach for an SVG minifier

The most common scenarios people bring an SVG here for

Web performance and Core Web Vitals

Every KB trimmed off icons and logos shaves page weight, and on image-heavy pages that can help LCP.

Cleaning up Figma or Illustrator exports

Strip the proprietary metadata layers those tools add automatically on export.

Prepping React or Vue components

An optimized SVG with no stray IDs pastes cleanly into a JSX/TSX component.

Keeping an icon library consistent

Run each icon through the same preset and precision, one file at a time, without setting up a local SVGO config or build step.

Common SVG optimization mistakes

Using Aggressive on complex illustrations

Rounding to 1 decimal place can introduce visible subpixel shifts on tight curves.

Removing IDs your CSS or JS references

IDs referenced inside the SVG (url(#), href, <style> selectors, ARIA attributes) are kept, but external CSS or JS is invisible to the tool. If something outside the file targets an ID, switch to Safe or untick Remove Unused IDs.

Losing <title> and <desc> without noticing

On every preset, Safe included, Remove Metadata deletes <title> and <desc>, which screen readers rely on. If the SVG needs them for accessibility, untick that option.

Assuming optimization replaces Gzip/Brotli

They're complementary: minify the SVG's markup and still enable compression on the server.

Why use this SVG optimizer

It applies the most common cleanups SVGO also does (comments, metadata, unused IDs and coordinate rounding) directly in your browser, with nothing to install.

You don't have to guess the savings: the tool shows the original size, the optimized size and the real reduction in % before you export. There's no server upload and no account, so your SVG never leaves your device. For JPG, PNG or WebP files, use the image compressor instead.

Frequently asked questions

It strips data the browser doesn't need to render the image (editor metadata, comments, redundant namespaces, excess decimal precision) without changing how it looks. The result is a smaller file that loads faster and parses quicker.

References

Related Tools