SVG Optimizer
Strip comments, metadata and editor namespaces from SVG, then compare file sizes.
How to use it
- Paste SVG source into the left panel — an inline snippet, an exported icon or a file opened in a text editor.
- Leave the cleanup options on for a normal pass: comments, metadata, whitespace, empty attributes, duplicate attributes, editor namespaces and number precision.
- Set Decimals to the precision your artwork needs; 2 is a safe default for icons, 1 is usually enough for large illustrations.
- Read the size readout above the panels — it shows the byte count before and after plus the percentage saved.
- Copy the result, or download it as an .svg file.
Every option can be switched off independently, so you can keep metadata for accessibility or keep full precision when coordinates must stay exact.
Common use cases
- Shrinking icon sets — hundreds of exported icons lose their comments and editor attributes one paste at a time.
- Preparing inline SVG — markup that goes into HTML or a component does not need the XML declaration, doctype or metadata block.
- Cleaning Inkscape and Illustrator exports — inkscape, sodipodi and serif namespaces are dropped along with every attribute that uses them.
- Comparing precision levels — switch between 1 and 4 decimals to see how much of the file is coordinate noise.
Why it stays private
The cleanup is plain string work in browser memory. Your artwork is never uploaded, so unreleased designs and internal icon libraries stay on your device.
FAQ
Q: Does it rewrite or simplify paths? A: No. The tool removes, merges and rounds values, but it never resamples a path or merges shapes. Every path command survives, and only the numbers inside those commands are rounded.
Q: Why did my file barely shrink? A: Files that are already minified have little left to remove. Try switching off the precision trim if the artwork has coordinates that must stay exact, and check whether the payload is really a raster image embedded as base64.
Q: Is the output still valid SVG? A: The cleanup preserves element structure, self-closing tags and attribute quoting. It does not touch the contents of style blocks and it does not resolve references between gradients, filters or clip paths, so a broken input stays broken.
Your data stays on this device
SVG Optimizer runs 100% locally. Everything you paste or drop is processed by your own browser and never transmitted. Nothing is stored on our servers — close the tab and it is gone.
Nothing you type is sent to a server, logged, or used for analytics. The page works even with your network disconnected after first load.