SVG Optimizer

Strip the junk out of an SVG file and export a crisp PNG at any size.

Runs in your browser

Input

Drop your file here

Drop an .svg file, or paste the markup below.

or click to choose a file

0 B

About this tool

Clean up an SVG exported from a design tool: drop the XML declaration, comments, metadata and editor-specific nodes, collapse whitespace and round coordinates, then export a PNG at whatever width you need. The optimisations are deliberately limited to changes that cannot affect how the file renders.

How to use it

  1. 1Drop an SVG file or paste its markup.
  2. 2Check the preview and the size saving, adjusting the decimal places if you like.
  3. 3Download the cleaned SVG, or export a PNG at the width you need.

Frequently asked questions

Why is it more conservative than other optimisers?

Because the aggressive passes — deleting ids, merging paths, rewriting transforms — can break a file in ways you only discover later, when a gradient stops applying or an animation stops running. This tool only removes things with no rendering effect, so the output is pixel-identical to the input.

What are the biggest savings from?

Inkscape and similar editors embed a metadata block, a named view element and dozens of private namespace attributes, which together often account for the majority of the file. Comments left by the designer and long floating point coordinates make up most of the rest.

Should I tick the option that removes title and description?

Leave it off for anything published on the web. Those elements are what screen readers announce for an image, so removing them saves a few dozen bytes at the cost of accessibility. Only tick it for icons that will be inlined many times on a page.

Related tools

Browse all tools