How to use the SVG Minifier & Optimizer
- Add your SVG – paste the code into the input box, or open or drag in an
.svgfile. - Choose optimizations – toggle what to remove and set the number precision. Fewer decimals give smaller files; 2 is a safe default.
- Compare – the preview panels show the original and optimized graphics side by side, along with the size saved.
- Copy or download – copy the optimized code or save it as a
.min.svgfile.
Frequently asked questions
Does optimizing change how my SVG looks?
With the default settings the image should look identical. If a graphic is very small or detailed, raise the precision to keep fine curves exact.
Is my SVG uploaded to a server?
No. Parsing and optimizing happens in your browser, and the preview is drawn locally.
What gets removed?
Comments, XML declarations, editor metadata (Inkscape, Sketch and similar), empty attributes and groups, unused IDs and unnecessary whitespace, plus extra decimal digits in numbers.
Why did I get an "Invalid SVG" message?
The code is not well-formed XML – for example an unclosed tag or a missing quote. The message shows where the parser stopped.
More free tools
Explore the full Utility Hub, our PDF tools and the JSON formatter.