Image Tools
SVG Optimizer
SVG Optimizer is part of Toolspire and is ready as soon as this page loads. Make SVG icons, logos and illustrations smaller without changing how they look — compare before and after, tune precision, optimise many files at once and copy the result as a data URI, CSS or a React component.
On this page
What you can do here
Smaller, same look
A pixel comparison checks the optimised SVG against the original every time.
Safe to publish
Scripts and event handlers are removed by default; previews never run scripts.
Many files at once
Drop a folder’s worth of icons and download them all as a ZIP.
Ready-to-paste code
Data URI, CSS, <img> and React component outputs with one-click copy.
Full control
Switch any of SVGO’s steps on or off, and keep IDs your CSS or JavaScript uses.
Private
Optimisation runs on your device — nothing is uploaded.
The sequence
How to optimise an SVG
- 1
Add SVG files
Drop one or more .svg files, or paste SVG code.
- 2
Check the preview
Compare the original and optimised image and the size saved.
- 3
Adjust if needed
Lower the precision for smaller files, or raise it if shapes change. Turn on Keep IDs if your CSS or scripts use them.
- 4
Download or copy
Download the file (or all files as a ZIP), or copy it as code, a data URI or a React component.
Worth knowing
- SVG Optimizer on Toolspire: uses SVGO, the standard open-source SVG optimiser, running entirely in this tab — files are not sent to us.
- Removes editor leftovers (Inkscape, Illustrator, Sketch, Figma metadata), comments and unused definitions, rounds numbers and rewrites path data — exports often shrink by half or more.
- Before/after preview on a transparent, white or dark background, with an automatic pixel check that warns if the optimised file looks different.
- Options for precision, multipass, responsive SVG (removes width/height), keeping IDs, removing scripts and pretty printing, plus every SVGO step individually.
- Batch: optimise many files at once and download them as a ZIP.
- Copy the result as SVG code, a compact data URI, CSS background, <img> tag, base64 or a React (JSX) component.
Which options to use
| Situation | Setting |
|---|---|
| Icons for a website | Precision 2–3, Make responsive on |
| Logos and detailed illustrations | Precision 3–4; check the pixel comparison |
| SVG styled or animated with CSS/JS | Keep IDs on |
| SVG pasted into HTML | Remove xmlns on |
| SVG from an unknown source | Remove scripts on (the default) |
| Code you will edit by hand | Pretty print on |
FAQ
Questions about SVG Optimizer
Where does SVG Optimizer run?
Does optimising change how my SVG looks?
Are my files uploaded?
What is SVGO?
Should I use a data URI or base64?
Why is the title kept?
Keep going
Related tools
Last updated Report a problem or suggest a feature