How to optimise an SVG
- Choose an SVG file (up to 10 MB).
- It's optimised straight away; the saving and the before and after sizes are shown.
- 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.