SVG OPTIMIZER
Slim your SVG, drop every redundant byte.
Upload or paste an SVG to strip comments, XML declarations, editor metadata and extra whitespace, with live size comparison and preview — all local.
Text-level minification (comments / metadata / whitespace) without reshaping the artwork — safe and lossless.
Processed locally in your browser
What does SVG compression do?
SVG is text and often carries comments, XML declarations, editor (Inkscape/Sketch/Adobe) metadata and indentation. This tool removes that redundancy and collapses whitespace inside tags and around attributes to shrink the file — the artwork is unchanged. Handy before shipping icons or deploying pages. All local.
FAQ
Does compressing change the graphic or break rendering?
No. This is a text-level cleanup: it strips comments, the XML declaration, the DOCTYPE, editor metadata (the namedview and vendor attributes Inkscape / Sketch / Adobe leave behind) and collapses whitespace between tags. It never reorders shapes, rewrites path data or rounds numbers, so the rendered result is identical.
Why is my SVG barely smaller?
If the file is already lean — common for hand-written SVGs or anything already run through SVGO — there is simply little left to remove. Files exported from Inkscape or Illustrator usually shrink noticeably, because those carry a lot of editor metadata and verbose path data.
Can I compress several SVGs at once?
Not in this version: it handles one file at a time so you can check the preview of each result. For multiple files, paste each SVG source into the input box in turn, or work through them in batches.
Does it validate that what I pasted is real SVG?
No strict validation is done. The text rules are applied as-is, so pasting plain text will also be “compressed” and previewed — the preview area may simply come out blank. Anything starting with <svg works fine.
Is my file uploaded to a server?
No. Reading, compressing and previewing all happen locally in your browser; the SVG never leaves your device.