How to use the SVG Optimizer
- Drop an SVG file or paste the code.
- Choose what to remove and how many decimal places to keep.
- Check the preview, then copy or download the optimised file.
What does this tool do?
Design apps export SVGs with editor metadata, comments and coordinates to many decimal places. Removing them often cuts the file size by 20–60%, which speeds up web pages.
Optimisation is conservative and happens in your browser. The preview is sanitised so any embedded scripts can't run.
Why use it?
- Typically 20–60% smaller.
- Adjustable precision.
- Safe preview.
Use cases
- Shrink icons and illustrations for websites.
- Clean SVGs before putting them inline in HTML or React.
- Reduce the size of icon sets.
Where the savings come from
An icon exported from a design app often has editor metadata, comments, empty groups and coordinates like 12.000004. Removing the junk and rounding to 2 decimal places commonly cuts 20–60% with no visible change.
Common mistakes
- Rounding too hard on tiny icons, which warps curves.
- Removing the viewBox, which stops the SVG scaling.
- Removing IDs that your CSS or JavaScript uses.
Accuracy and limits
- Two decimal places is safe for most icons; use 3 or more for large, detailed illustrations if you see shapes shift.
Privacy
Your files are processed entirely in your browser using built-in web technologies. They are not uploaded to our servers, and closing the page clears them from memory. There's no account to create and nothing to install.
Frequently asked questions
How many decimals should I keep?
1–2 for icons on a 24 × 24 grid; more for large, detailed illustrations.
Is it safe?
Optimisation is conservative, and the preview lets you compare before downloading.
Are scripts in SVGs run?
No, the preview is sanitised.
Content last updated . See how M2Toolkit works.