CraftTools

SVG Optimizer

Guide: SVG vs PNG: When to Use Each and How to Shrink SVG Files

Drag an SVG file here, or

Your images stay on your device. Nothing is uploaded.

813 B → 234 B (71% smaller)

Before optimizing
Before
After optimizing
After

Check that the two pictures look the same before you use the result. If something changed, turn off the options one at a time, starting with rounding.

Nothing you enter or choose here leaves your device. This tool runs in your browser.

How to use

  1. 1Drag in an SVG file, or paste the SVG code.
  2. 2Keep the default options, or switch some off.
  3. 3Compare the before and after pictures, then copy or download the result.

Frequently asked questions

Is my SVG uploaded?

No. Everything happens in your browser, so your files are never uploaded.

How much smaller will it get?

Files exported from Inkscape, Illustrator or Sketch often shrink by half or more, because they carry editor data, metadata and long numbers. Clean hand-written SVGs shrink less.

Will it change how my picture looks?

The defaults are meant to keep it identical, and the page shows the before and after side by side so you can check. Rounding numbers to too few places is the one option that can change the shape, so keep at least 2 or 3.

Is it safe to remove the title and description?

They are used by screen readers, so only remove them for purely decorative pictures. That option is off by default.

Why are some ids kept?

An id is kept if something refers to it, such as a gradient or a use element. If the file has a style or script, every id is kept to be safe.

Read the guide

Learn how this works and how to get the most from it.

Images

SVG vs PNG: When to Use Each and How to Shrink SVG Files

How vector SVG differs from PNG, when each is best, how to turn an SVG into a PNG at any size, and how to clean up and optimize SVG files.

2 min read

SVG to PNG Converter

Turn SVG files into PNG, JPG or WebP at any size.

Image Compressor

Make JPG, PNG and WebP images smaller. Private, in your browser.

CSS Minifier & Beautifier

Compress CSS to save bytes, or format it so it is easy to read.

Image to Base64 Converter

Convert an image to a Base64 data URI, or turn Base64 back into an image.