Free Online SVG Optimizer
Optimize, minify, and clean SVG files online. Removes Inkscape/Illustrator metadata, comments, empty groups, and unnecessary attributes — free, 100% client-side.
100% Client-Side · Your data never leaves your browserOptimization Options
How to Use SVG Optimizer
Paste your SVG code into the Input SVG pane, configure the options, then click Optimize (or press Ctrl/Cmd+Enter).
- Remove Comments — strips
<!-- ... -->blocks that add no visual value. - Remove Metadata — removes the
<metadata>element containing Dublin Core / RDF data embedded by Inkscape and Illustrator. - Remove Editor Attrs — deletes
inkscape:*,sodipodi:*, anddata-nameattributes along with their namespace declarations. These are safe to remove. - Collapse Whitespace — normalises multiple spaces and newlines inside attribute values and between tags.
- Remove Empty Groups — eliminates
<g></g>elements that contain no children. - Round Numbers — reduces the decimal precision of coordinates in path
dattributes (e.g., 123.456789 → 123.46). Choose 1–3 decimal places or disable entirely.
After optimizing, the Stats bar shows the original size, the optimized size, and the percentage saved. Each applied optimization is listed as a tag. The Preview panel renders the output so you can verify it looks correct. Use Format (pretty-print) to expand a minified SVG into readable XML. Press Ctrl/Cmd+K to clear.
Frequently Asked Questions
What does SVG optimization do?
SVG optimization removes data that is unnecessary for rendering: editor metadata (author names, software version, edit history), XML comments, empty container elements, redundant namespace declarations, and excessive whitespace. It may also round overly precise decimal numbers in path data. The result is a smaller file that renders identically in all browsers.
Why do SVGs exported from Inkscape or Illustrator contain so much extra data?
Inkscape and Adobe Illustrator embed private namespaced attributes (inkscape:*, sodipodi:*, ai:*) and metadata blocks (<metadata>) to preserve editing state: layer names, grid settings, font substitutions, and document properties. This information is essential in the editor but irrelevant to a browser rendering the file. Removing it is always safe.
Will optimization affect how my SVG looks?
The options in this tool are designed to be visually lossless. Removing comments, metadata, and editor attributes does not change rendered output. Rounding path numbers to 2 decimal places is imperceptible at typical display sizes (the error is less than 0.01 px). Always preview the output before deploying it to make sure it looks correct.
Why does path data precision matter for file size?
Vector drawing tools often export path coordinates with 6–10 decimal places of precision (e.g., 123.456789). For web display this is far more than needed — 1–2 decimal places is sufficient. Rounding these numbers reduces the file character count significantly, especially in complex illustrations with hundreds of path segments.
What is a safe optimization vs an unsafe one?
Safe optimizations preserve visual output: removing comments, metadata, editor attributes, and empty groups. Unsafe optimizations can change appearance or functionality: removing the viewBox attribute (breaks scaling), converting colours between formats when the CSS cascades on them, or removing id attributes that JavaScript references. This tool only applies safe optimizations by default.
How does this compare to SVGO?
SVGO (the Node.js CLI tool) is the industry-standard optimizer and applies dozens of plugins including advanced path merging and shape-to-path conversion. This browser tool covers the most impactful optimizations — metadata removal, whitespace collapsing, number rounding — without requiring any installation. For production pipelines, SVGO or the svgo Vite/webpack plugin is recommended; this tool is ideal for one-off files or when you cannot run a CLI.