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.
Related tools
More from the same category · Design Tools
Color Palette GeneratorGenerate palettes in one click and copy the hex values into your design.Color Format ConverterConvert HEX, RGB, HSL, CMYK and HSV live with one synced picker.QR Code GeneratorMake QR codes with your logo and colors, then export vector SVG.QR Code DecoderScan a QR from an image or camera and copy its link or text.Barcode GeneratorCreate Code128, EAN, UPC and more barcodes as vector files.Barcode DecoderRead the value of a 1D barcode image for fast stock checks.