SVG Optimizer
Minify & clean SVG files for the web
Paste or upload an SVG to strip comments, metadata and redundant whitespace, shrink its file size and see the savings — all in your browser.
The optimized SVG will appear here.About the svg optimizer
SVG files exported from design tools often carry comments, editor namespaces (Inkscape, Illustrator), metadata blocks and redundant default attributes that bloat the file without affecting how it renders. Removing this dead weight speeds up page loads and shrinks icons.
This optimizer strips comments, <metadata>, <title> and <desc> elements, editor namespaces and sodipodi/inkscape cruft, removes common default attributes, and collapses whitespace between tags — all without changing the visible shape.
Options
- Remove comments — delete
<!-- … -->blocks. - Remove metadata — drop metadata, title, desc and editor namespaces.
- Remove default attributes — drop attributes that match the SVG default.
- Collapse whitespace — remove indentation and inter-tag whitespace.
How to use the svg optimizer
Paste or upload an SVG
Paste SVG markup into the box, or upload an .svg file.
Choose options
Toggle which optimizations to apply — all are on by default.
Read the result
The optimized SVG and the byte savings appear instantly.
Copy or download
Copy the cleaned SVG to your clipboard or download it as a file.
Frequently asked questions
Will optimization change how my SVG looks?
What are sodipodi and inkscape namespaces?
How much can I expect to save?
Does this handle SVGZ (gzipped SVG)?
Is my SVG sent to a server?
I want to…
Common reasons people reach for the svg optimizer — see if it matches your task.
- Minify an SVG file for the web
- Strip comments and metadata from an SVG
- Reduce the file size of an SVG icon
- Clean up and compress SVG markup
Related free tools
More free online utilities that pair well with this one — same-category tools for the same task, plus handy extras from other categories.