SVG Optimizer
Clean your SVG files — remove editor junk, comments, metadata and unused attributes. 100% local.
Drop an SVG file or click to browse
Or paste your SVG code below
Input SVG
—
Optimized SVG
—
What gets removed
1
XML declaration & DOCTYPE —
<?xml version="1.0"?> and <!DOCTYPE> are unnecessary in HTML contexts.2
Comments —
<!-- ... --> blocks added by editors like Figma, Illustrator or Inkscape.3
Editor metadata —
<metadata>, <title>, <desc>, Inkscape/Sodipodi/Sketch namespaces and attributes.4
Empty groups —
<g></g> elements that serve no purpose but increase file size.5
Whitespace — Collapses multiple spaces and newlines into single spaces, reducing size significantly.
How it works
1
Paste or drop your SVG
Drop an .svg file or paste raw SVG markup directly into the input field.
Drop an .svg file or paste raw SVG markup directly into the input field.
2
Optimize
Click Optimize. The tool strips comments, whitespace, redundant attributes, default values and unnecessary elements using a pure JavaScript optimizer — no server needed.
Click Optimize. The tool strips comments, whitespace, redundant attributes, default values and unnecessary elements using a pure JavaScript optimizer — no server needed.
3
Review savings
Check the before/after size comparison (in bytes and percentage). A live preview shows the visual result is unchanged.
Check the before/after size comparison (in bytes and percentage). A live preview shows the visual result is unchanged.
4
Copy or download
Click Copy to copy the optimized SVG to your clipboard, or Download to save it as a .svg file ready for production.
Click Copy to copy the optimized SVG to your clipboard, or Download to save it as a .svg file ready for production.