SVG Optimizer
Minify SVG code, remove unused attributes, compress file size, and compare before and after optimization.
Original SVG
Optimized SVG
Optimization Options
Features
The SVG optimizer minifies SVG code, removes unused attributes and redundant data, and effectively compresses file size. All processing is done locally in the browser without uploading to a server.
- Remove comments:Remove HTML comments in SVG to reduce file size.
- Remove metadata:Remove descriptive tags such as title, desc, and metadata.
- Remove editor data:Remove attributes left by editors such as Inkscape, Sodipodi, and Sketch.
- Shorthand colors:Shorten #aabbcc format to #abc and convert rgb() to HEX.
- Minify paths:Compress whitespace and redundant decimals in SVG path data.
- Shorten IDs:Replace long ID names with short identifiers and update all references.
How to Use
- Paste code:Paste SVG code into the input box on the left, optimization triggers automatically.
- Upload file:Click the "Upload" button to select a local .svg file.
- Adjust options:Check or uncheck optimization options as needed and view results in real time.
- Compare preview:View the rendering before and after optimization below to ensure visual consistency.
- Copy/Download:Click "Copy" to get the optimized code, or click "Download" to save as a file.
Tip: After optimization, check the preview. Some aggressive options (such as collapsing groups or shortening IDs) may affect CSS/JS references within the SVG.