SVG Compressor

Make SVG files smaller without changing how they look - editor junk, metadata and long numbers go, the drawing stays. Everything runs in your browser. Working with bitmaps? Try Compress PNG or turn a PNG into a vector with PNG to SVG.

How to Compress an SVG File

  1. Add your SVG. Drop one or more SVG or SVGZ files into the box, browse for them, or paste SVG code with Ctrl+V.
  2. Pick a preset. Recommended suits most files. Safe keeps more structure, Maximum squeezes out every byte, Inline in HTML prepares code for web pages.
  3. Check the result. Compare before and after, see the measured size and gzip size, and read what was removed. A visual check warns you if anything changed.
  4. Download or copy. Download the optimized SVG, a ZIP for three or more files, or copy the code or a data URI for CSS.

What Makes an SVG Bigger Than It Needs to Be

An SVG is a text file, so every character counts.

Design apps write a lot more than the drawing itself. This tool removes it step by step and shows how many bytes each step saved.

Editor data

Layer names, guides, zoom levels and hidden layers from Illustrator, Inkscape, Sketch or Figma.

Useful in the app, useless on a website.

Long numbers

Coordinates like 124.3829174 can usually be 124.38 with no visible change.

On detailed artwork this is the biggest saving.

Dead code

Unused gradients, empty groups, default values and comments.

They never render, but they still download.

Which Preset Should You Use?

PresetPrecisionBest for
Recommended2 decimalsIcons, logos and illustrations for the web
Safe3 decimalsFiles you still edit, animations, files with CSS
Maximum1 decimalSimple icons where every byte counts
Inline in HTML2 decimalsPasting SVG code into a web page or a component

Not sure? Start with Recommended and look at the visual check on each row. Animated SVGs and files with <style> blocks are detected, and the risky steps are skipped for them automatically.

Tips for Small, Fast SVGs

  • Embedded photo inside? If an SVG wraps a bitmap, the code cannot shrink much. Export the picture and use Compress PNG or Compress JPG instead.
  • Need a favicon or app icon? Turn the optimized SVG into one with SVG to Favicon or SVG to ICO.
  • Wrong size on the page? Turn on Responsive size so CSS decides the width, or set exact pixels with the SVG Resizer.
  • Comparing formats? For photos, an SVG is rarely the right choice - the Compression Analyzer shows which bitmap format is smallest.

Frequently Asked Questions

Drop your SVG files into the box above, or paste SVG code. They are optimized right away with the Recommended preset, and every row shows the measured size before and after.

Press Download for one file, or Download ZIP when you have three or more.

Normally not. Most of the saving comes from things you never see - editor data, comments, metadata, unused definitions and long numbers.

After each file is optimized, the tool draws the old and the new version and compares the pixels. If anything changed visibly, the row says so - then pick a higher precision or the Safe preset.

It is the number of decimals kept in coordinates. 2 turns 12.3456789 into 12.35, which is invisible for icons and logos and often saves 30-50%.

Very small or very detailed drawings (maps, fine line art) may need 3. Lossless keeps every digit and only cleans up the code.

Design apps save extra data so they can reopen the file later: layer names, editor settings, hidden layers, unused gradients, metadata and numbers with six or more decimals. Illustrator can even embed a full copy of its own document.

None of it is needed on a website. Curious what is inside? Open the file in the SVG Analyzer.

Web servers usually send SVG files gzip-compressed, so the gzip size is roughly what your visitors really download. It is measured in your browser on the optimized file.

Choose SVGZ as the output if you want a gzip-compressed file to keep - some apps and older workflows use it.

Unused IDs are removed only when the SVG has no styles or scripts that could need them. The title and description are kept by default, because screen readers use them.

Minify IDs is off by default: turn it on only if you do not place several SVGs inline on the same page, where short IDs could clash.

Yes. Drop up to 100 SVG or SVGZ files together. Every file uses the same settings, and three or more download as one ZIP with a short README.

Need a bitmap version too? Convert the result with SVG to PNG or resize it with the SVG Resizer.

No. The SVG is parsed, optimized and checked inside your browser, so your files never leave your device. That also makes it quick - most files are done before you can blink.

Guides & Tutorials

All 40 guides
Optimization How to Resize a GIF Without Losing Quality (and Make It Smaller) Sep 4, 2025 · 4 min read Read Optimization How to Reduce Image File Size Without Losing Quality (2026 Guide) Jan 29, 2026 · 5 min read Read Comparison ICO vs SVG: Which Icon Format Should You Use? Jun 2, 2025 · 4 min read Read