Skip to content
AllInOneTools

SVG optimizer

Make SVG files smaller: remove comments, metadata and editor data, empty groups and round numbers – with live preview.

Runs in your browser – your files are not uploaded

How to use SVG optimizer

  1. 1

    Drop an SVG file or paste the SVG code.

  2. 2

    Choose which optimizations to apply and the number precision.

  3. 3

    Compare both previews and the file sizes.

  4. 4

    Download the optimized SVG or copy the code.

About SVG optimizer

SVG files exported from design tools often contain much more than the drawing: XML declarations, comments, metadata, editor-specific attributes from Inkscape, Illustrator, Sketch or Affinity, empty groups, indentation and coordinates with six or more decimals. This optimizer removes that ballast with safe, hand-written rules.

You see the original and the optimized file side by side, together with the size before and after. Text content, styles and scripts are never modified, and you can switch every rule off individually. The previews are sanitized; everything runs locally in your browser.

Frequently asked questions

Can optimization break my SVG?

The rules are conservative: they only remove data that does not affect rendering and never touch text, styles or scripts. Rounding numbers is the only lossy step – with very small graphics or very low precision, shapes can shift slightly, so check the preview and increase the precision if needed.

How is this different from SVGO?

SVGO applies many more, partly aggressive transformations (merging paths, converting shapes, minifying styles). This tool focuses on safe clean-ups that are easy to understand, which is often enough to cut editor exports by 30–70 %.

Is the SVG sanitized?

The previews are sanitized with DOMPurify and displayed as images, so scripts in an SVG cannot run on this page. The downloaded file is your optimized code; if you got an SVG from an untrusted source, check it before embedding it inline in a website.

Is my file uploaded?

No. The optimization runs entirely in your browser.