SVG Optimizer

Make icons and logos load faster by removing everything the browser doesn't need.

How to optimise an SVG

  1. Choose an SVG file (up to 10 MB).
  2. It's optimised straight away; the saving and the before and after sizes are shown.
  3. Copy the code or download it as .min.svg.

What gets removed

The tool uses SVGO, the widely used open-source SVG optimiser, with its standard safe settings, run several times until nothing more can be saved. It removes editor metadata, comments, hidden and empty elements, and unnecessary precision in numbers, and it shortens paths and colours. It also removes any <script> elements, so the file can't run code when it's shown on a web page.

How much smaller?

SVGs exported from design tools carry a lot of editor information, so they often shrink noticeably. Hand-written or already optimised icons may barely change. The result shows the exact saving for your file.

Tips

  • Open the optimised file and compare it with the original before replacing it, especially for complex illustrations.
  • Keep the original from your design tool; the optimised file is for publishing, not editing.
  • For a favicon, convert a PNG version with the ICO converter.

Frequently asked questions

How much smaller will my SVG be?

It depends on the source. Files exported from design tools often shrink noticeably; hand-written SVGs may barely change.

Is it safe for logos?

Yes for normal logos and icons. Always compare the preview before replacing the original.

Is my file uploaded?

No. SVGO runs in your browser.

Why remove scripts from an SVG?

SVG files can contain JavaScript that runs when the image is opened directly in a browser. Removing scripts makes an SVG from an unknown source safer to publish.

More image tools

See all image tools →