CSS / JS Minify
Paste a CSS or JavaScript snippet, pick the language, and get a single compact line. This is a whitespace pass, not a bundler.
body { color: red; }
About this tool
The old JavaScript minify URL was a copy of the CSS tool. Both live here now. Block comments are removed; JavaScript also drops // line comments. Selectors, names, and strings are not rewritten.
How to use
- Pick the language: Choose CSS or JavaScript so the comment rules match.
- Paste the code: Drop a stylesheet or script fragment into the editor.
- Read the compact line: Comments and extra spaces collapse as you type.
- Copy the result: Paste it into a page, gist, or size check.
Common use cases
- Shrink a CSS snippet before pasting into a CMS field.
- See how much whitespace a small JS helper costs.
- Clean commented draft styles before sharing a gist.
- Prepare a compact inline snippet for a demo.
Tips
- Keep the formatted source. Minified output is hard to edit.
- Strings that contain comment markers can confuse this simple stripper.
FAQ
Does this rename variables or merge CSS rules?
No. It only removes comments and collapses whitespace.
Where did the JavaScript minify page go?
It redirected here. The same page now has a language switch.
Is my code uploaded?
No. Minification runs in your browser.
Why might output look wrong?
Comment markers inside strings can break a naive strip. Check important files.