Remove comments from CSS

Paste a stylesheet with /* */ notes in it. This strips every comment block and leaves your rules exactly as they were written.

CSS
With comments
Loading editor…
Cleaned
Cleaned CSS will appear here.

Why bother stripping CSS comments

A stylesheet that's been maintained for a year usually has a graveyard of old values commented out "just in case," section headers for a layout that got rebuilt twice since, and the occasional apology for a hack that's been load bearing ever since. None of it does anything at runtime.

Pulling comments out is also a normal pre-minification step, and it makes a stylesheet a lot faster to skim when you're trying to figure out which rule is actually responsible for the thing you're debugging.

What CSS comments look like

CSS has exactly one comment syntax: /* ... */. It can sit on its own line, trail after a property, or wrap several lines of disabled rules. This tool removes all of it and leaves every selector, property, and value untouched.

Frequently asked questions

CSS only has one comment style, right?

Right, just /* ... */. There's no // line comment in plain CSS (some preprocessors like Sass allow it, but that's Sass syntax, not CSS). This tool removes the /* */ style only.

Will this affect selectors or values that contain slashes?

No. Shorthand values like the slash in font: 16px/1.5 sans-serif are left alone. Only real /* */ comment blocks are removed.

Does it work on a full stylesheet, not just one rule?

Yes, paste the whole file. It walks through every rule and strips comments wherever they show up, whether that's above a selector, inside a block, or between properties.