What gets removed
The compressor drops XML declarations, DOCTYPEs, comments and editor metadata, collapses runs of whitespace, and trims space between tags. Those are the safe wins — they never change rendering. The byte counter shows exactly what you saved.
What it deliberately does not do
Aggressive optimisers rewrite path data, merge groups and round coordinates. That can shave another 20–40%, but it can also break strokes, gradients and animation. This tool stays lossless: if the output looks wrong, the input had a quirk worth investigating.
When SVG size matters
- Inline SVG in HTML inflates every page load — compress and gzip
- Icons repeated many times are better as an SVG sprite or symbol set
- Illustrations with thousands of paths benefit most from path rewriting (use a build-time optimiser)
Serving SVGs well
Serve with Content-Type: image/svg+xml, enable gzip or brotli (SVG is text and compresses 60–80%), and set a long cache lifetime with a hashed filename. Inline only the icons you need above the fold.
Frequently Asked Questions
Is the compression lossless?
Yes — only comments, declarations and redundant whitespace are removed. Geometry is untouched.
Can it minify path data?
No, by design. Use a build-time optimiser such as SVGO if you need path rewriting.
Why did my file barely shrink?
Files that are already minified have little to remove. The savings come from hand-edited or exported-from-Figma markup.
Privacy & Your Data
CSSmith runs entirely in your browser. Whatever you type, paste or upload is processed on your own device and never sent to a server — there is no backend to store it.