SVG Optimizer
Strip the cruft and shrink the file
Input
Result
Nothing entered yet
Drop in a file or paste code — the result appears here.
The viewBox is always kept, so responsive scaling never breaks.
SVGs exported from Illustrator or Figma carry layer names, editor metadata and coordinates with far more decimal places than anyone can see. Removing all of it typically halves the file without changing how it looks.
How to use
- 1 Drop in an SVG file, or paste the code.
- 2 Adjust the options if you need to — turn off ID cleanup when your CSS or JavaScript references them.
- 3 Compare the before and after size.
- 4 Copy the optimised code or download it.
Frequently asked questions
Will optimising change how it looks?
With the default settings, no. Lowering the decimal precision too far is the one thing that can visibly roughen curves — if smooth shapes start to look angular, raise it back.
When should I keep the IDs?
Whenever anything outside the file refers to them: CSS selectors, JavaScript that animates a path, or internal references like gradients and clip paths. If in doubt, leave ID cleanup off.
Is the viewBox preserved?
Always. Removing it would break responsive scaling, so it is never touched regardless of the other settings.