Preview SVG safely, see what was stripped, export PNG at any size
SVG Optimizer
Make your SVG smaller without changing how it looks, and get proof that it still draws the same.
Loading tool…
How to use svg optimizer
Paste SVG markup, open a file, or try the sample exported from an editor.
Pick how many decimal places to keep and which clean-ups to run.
Read the before and after sizes and the result of the pixel check.
Copy or download the optimized SVG once the check says both versions draw the same.
What this tool does
- Removes comments, the XML declaration, doctype, metadata, Inkscape, Illustrator, Sketch and Serif data, unused ids, empty groups and attributes set to their default.
- Rounds path data, transforms and coordinates without drift: relative path moves are recomputed from the rounded position.
- Draws the original and the result side by side, then compares them pixel by pixel; the download stays off until they match.
- Shows gzip sizes as well, since that is what a web server usually sends.
How the result is verified
Both versions are drawn at up to 512 pixels on the long side and compared; the result passes only if no more than 0.1% of pixels move by more than a faint anti-aliasing step.
Frequently asked questions
How many decimal places should I keep?
For icons drawn on a grid of 24 or so units, 2 or 3 is safe. Detailed illustrations with a large viewBox can use 1. If the pixel check fails, add a decimal place and it reruns.
Why keep the title and desc elements?
Screen readers read the title of an inline SVG, so removing it can hide meaning from people who rely on them. It is off by default; turn it on only for decorative graphics.
Is my data uploaded to a server?
No. Everything you drop, paste or type is processed by code running in this browser tab. You can check it yourself: open your browser's developer tools, watch the Network panel, and use the tool. No request carries your data.
Related tools
viewBox, size, elements, colours, fonts, ids and a safety report
Smaller CSS with comments, whitespace and empty rules removed safely
Seamless dots, grids, stripes, waves and more as SVG, CSS or PNG