Web Tools
CSS Minifier/Beautifier
Minify or beautify CSS with a tokenizer-based processor. Remove whitespace, comments, and trailing semicolons for production, or format minified CSS for readability. Shows size reduction, rule count, selector count, and declaration statistics. Runs entirely in your browser — your data never leaves your machine.
css minify beautify format compress optimize stylesheet
Published May 29, 2026
All interactive tools run entirely in your browser. Your data never leaves your device.
How It Works
Paste CSS and choose between minify (compress for production) or beautify (format for readability). The tokenizer-based processor handles comments, strings, at-rules, and nested blocks correctly.
Features
- Two modes: minify for production, beautify for readability
- Minify: removes whitespace, trailing semicolons, and optionally comments
- Beautify: proper indentation with configurable indent size (2 or 4 spaces)
- Comment handling: toggle comment removal in minify mode
- Statistics: input/output size, reduction percentage, rule/selector/declaration counts
- Copy to clipboard: one-click copy of processed CSS
- 5 examples: basic styles, media queries, flexbox, CSS variables, animations
- Private: runs entirely in the browser — no data transmitted
Use Cases
- Minifying CSS for production deployment
- Formatting minified CSS for debugging and code review
- Measuring CSS compression ratios
- Analyzing CSS complexity (rules, selectors, declarations)
- Quick CSS cleanup without build tool overhead