SVG Optimizer

Clean up SVGs exported from Illustrator, Figma or Inkscape: editor data, comments and needless decimals are removed, which usually saves 20–70% with no visible change. Scripts and event attributes are always stripped, so the result is safe to put on a website.

Your images stay on your device. Processing happens entirely in your browser.

How to use SVG Optimizer

  1. Drop one or more SVG files.
  2. Choose the precision and whether to keep metadata and the viewBox. Turn on "Readable code" if you want to edit the file by hand.
  3. Click "Optimize SVG", compare before and after, then download the file or copy the code.

Frequently asked questions

How much smaller do SVGs get?

It depends on the source. Files exported from design programs usually shrink by 30–70% because of editor data and long decimals; icons that are already optimized may only lose a few percent.

What does precision mean?

The number of decimal places kept in coordinates. 3 is safe for almost everything. 1–2 gives smaller files, but small icons or detailed drawings may shift slightly, so check the preview. Choose 4–5 for very large or very detailed drawings.

Why keep the viewBox?

The viewBox lets the SVG scale freely with CSS. Without it the image may be cropped or stop resizing, so keep it unless you are sure you need fixed sizes.

Are scripts removed?

Yes, always. <script> elements, event attributes such as onclick or onload, and javascript: links are removed from the result. Both previews are shown only as images, so nothing in the file can run. If anything was removed, the result note says how many items.

Can I convert a PNG or JPG to SVG here?

No, this tool only optimizes files that are already SVG. To turn a picture into a vector use PNG/JPG to SVG, then optimize the result here. To make website icons from an SVG use Favicon Generator.

Are my files uploaded?

No. svgo runs in your browser and your files never leave your device.

Other tools

Search tools