About SVG Optimizer
SVG files exported from design tools carry extra weight: XML declarations, comments, metadata blocks, editor namespaces and attributes that browsers ignore. Removing that noise is a safe first step, and rounding coordinates to two decimals often cuts a file down substantially without visible change.
This optimizer parses your file as XML in the browser, removes editor data, scripts, event handlers and external references, optionally strips empty groups and rounds number precision, then serializes the result. viewBox and the overall structure are preserved, and the tool reports exactly what it removed and how many bytes the file lost.
What this tool does
Editor noise removal
Drops XML declarations, comments, metadata elements and Inkscape, Sodipodi and Illustrator namespaces and attributes.
Safety cleanup
Removes script elements, on* event handlers, javascript: links and references to external URLs, including @import rules in embedded styles.
Number precision control
Round coordinates and path numbers to 0, 1, 2 or 3 decimals, or keep full precision, to trade size for exactness.
Minify or keep formatting
Strip whitespace between elements for the smallest file, or keep the original line breaks to stay readable.
viewBox preserved
The coordinate system is never rewritten, so scaling and alignment behave exactly as before.
Before and after report
See the original size, optimized size, percentage saved and a list of what was removed or rounded.
How to use SVG Optimizer
- 01
Add an SVG file
Drop a .svg file up to 5 MB, or click to browse. The markup is read locally as text.
- 02
Choose precision
Two decimals is a good default; use zero or one for hand-written icons and three for detailed artwork.
- 03
Choose output whitespace
Minify for the smallest file, or keep formatting if you plan to edit the result by hand.
- 04
Run the optimizer
The tool parses the SVG, removes unsafe and redundant data, rounds numbers and rebuilds the markup.
- 05
Review and download
Check the byte savings and removal report, then download the optimized SVG and test it in place.
How this tool works
- Works with
- SVG → Optimized SVG
- Processing
- Client-side, in your browser. Nothing is uploaded.
- Maximum size
- 5 MB per file
- Requirements
- Chrome, Edge, Firefox or Safari on desktop or mobile · No installation or account; parsing and serialization run on your device
Limitations worth knowing
- This is a safe basic optimizer, not full SVGO: it does not convert shapes to paths or merge repeated attributes.
- Precision rounding can shift fine paths by a fraction of a pixel, so review detailed artwork before publishing.
- Safety cleanup removes scripts, script-driven animation and external images by design.
- Files above 5 MB are rejected to keep the browser responsive.
Privacy and file handling
Your SVG is read as text with the File API, parsed and rewritten in this browser tab, and turned into a download locally. It is never uploaded, no copy is stored on a server, and no network request carries the markup.
Read the full privacy policy
