SVG optimizer
Choose SVG files or paste the code. The tool cleans out what the browser doesn't use and shows how much smaller it got and a before and after preview.
How to useMake your SVG lighter
SVG optimizer: what it is for
Choose one or more SVGs or paste the code. The tool removes comments, the XML declaration, metadata, Inkscape, Sodipodi and Illustrator data, empty groups and whitespace, deletes unused ids and rounds coordinates to 0 to 3 decimals. Title and desc can be kept for accessibility.
See the size before and after, a side-by-side preview and download them one by one or all in a .zip. Nothing leaves your device.
How to use
- Choose SVG files or paste the code.
- Choose the decimals and what to remove.
- Check the preview and download the optimized SVGs.
When to use it
- Icons and logos exported from Figma and Illustrator.
- Making your site lighter.
- Cleaning SVGs before inlining them in HTML.
Frequently asked questions
What gets removed?
Comments, the XML declaration, DOCTYPE, metadata, Inkscape, Sodipodi and Illustrator data, editor attributes, unused ids (optional), empty groups and extra whitespace. Coordinates are rounded to the number of decimals you choose.
How many decimals should I use?
For icons and logos, 1 or 2 decimals are usually invisible on screen. For very detailed drawings or ones with a small viewBox, use 3. Check the preview: if something gets distorted, increase the decimals.
Is the file uploaded to a server?
No. Everything happens in the browser; the files never leave your device.
Is it really free?
Yes, 100% free. No sign-up, no subscription and no usage limits. All Tools123 tools are free and run right in your browser.