SVG → SVG
SVG optimizer
Make SVG files smaller without changing how they look. The optimizer runs SVGO in your browser and shows the result next to the original.
Runs in your browser · files stay on your device
How to compress an SVG
- Add your SVG. Drop it, pick it or paste it.
- Set the decimal places. Fewer decimals give a smaller file. Check the preview for shifted edges.
- Compare both previews. The original and the optimized version are shown side by side with the size saved.
- Download or copy the code. The file name gets a .min.svg ending.
What the SVG optimizer removes
Design tools add data that browsers never use: editor namespaces and metadata, comments, hidden layers, empty groups, default attribute values and coordinates with more decimals than a screen can show. The optimizer uses SVGO, the open-source optimizer used in many web build tools, with its default set of safe plugins.
Compress SVG files by rounding decimals
Path data is often the largest part of an SVG, and much of it is decimals. A coordinate like 12.483920 drawn on a 24 px icon looks the same as 12.48. The decimal places slider controls this rounding. For icons, 1 to 2 decimals are usually enough; for detailed illustrations or maps, keep 3. Repeat until no more savings applies the plugins several times, which squeezes a bit more from complex files.
Compress SVG file for the web: responsive option
Tick Remove width and height to drop the fixed dimensions and keep only the viewBox. The SVG then scales to the width of its container, which is what you want for icons and logos in CSS layouts. Leave it unticked if the SVG must keep an exact size.