IMAGES / SVG OPTIMIZER
SVG Optimizer
Compact markup, compare actual bytes, and keep the version that works for you.
Files stay on your deviceCompare your result
Rendering preview…
Rendering preview…
Compare both versions before replacing your original.
Isolated static previews: remote images, fonts and styles are not fetched; scripts and animation do not run. Text uses the bundled DejaVu Sans font. Some SVG features are unsupported. The SVG downloads keep references and active content; these previews do not prove browser equivalence or make the file safe.
How to optimize an SVG
- Add your SVG. Choose a UTF-8 file or paste its code.
- Choose settings. Start with compact markup; enable metadata or geometry changes only when useful.
- Compare and download. Review code, byte counts and static previews. Keep the original if the result is larger or unsuitable.
Files stay on your device
Parsing, optimization and rendering run in your browser. Input contents and names are not uploaded, logged or saved by this tool.
Cancel stops processing. Reset clears inputs, results and settings. Leaving the page releases preview and download URLs.
Frequently asked questions
Can optimization change appearance?
Yes. Default settings retain geometry attributes, IDs, styles, viewBox and accessibility titles/descriptions. The tool still rewrites the XML, compacts whitespace and removes the XML declaration. Optional shape and number optimization can change paths, round numeric values and affect CSS selectors. This is not a guarantee of visual equivalence, especially for interactive SVGs or embedded HTML.
Will the SVG always be smaller?
No. Existing compact SVGs may stay the same size or grow when serialized. The result reports actual UTF-8 bytes and the difference, including no reduction. Download original keeps the exact source bytes.
Are previews the same as opening the SVG?
No. Previews are static PNG thumbnails. Remote resources are omitted, a bundled font substitutes for requested fonts, scripts and animation do not run, and unsupported features may disappear. A failed preview does not prevent downloading valid optimized code. Check the SVG in its intended environment before replacing your original.
Does this sanitize SVG files?
No. Output retains scripts, event attributes, links and external references unless an enabled optimization changes their containing data. Nothing is injected into this page as markup. Only use downloaded SVGs in a context you trust; optimizing a file does not remove active content.
Which files and browsers work?
Use well-formed UTF-8 SVG XML. XML entities requiring a DTD are unsupported by the strict validator; expand them before processing. Preview support varies by browser. No file-size limit is imposed here, but available browser memory and browser capabilities can prevent processing or rendering. Cancel remains available while working.