How to optimise an SVG
- Choose one or more SVG files (up to 10 MB each), or paste SVG code.
- Pick the number precision and, if you like, Prettify, Responsive or Keep IDs. The result updates straight away.
- Press Show original to compare, then copy the code or download it as
.min.svg(several files come as a ZIP).
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 and event handlers, 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, plus the gzipped sizes, which is what most web servers actually send.
Tips
- Compare the optimised file with the original before replacing it, especially for complex illustrations.
- Keep IDs on when your CSS or JavaScript targets elements inside the SVG by id.
- 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.