CSS Formatter & Minifier
Format CSS with proper indentation or minify CSS for production. Free online CSS formatter and minifier. Runs entirely in your browser with no server requests.
Frequently Asked Questions
How does CSS formatting work?
This tool parses your CSS and applies consistent formatting: one property per line, proper indentation inside rule blocks, consistent spacing around colons and semicolons, and blank lines between rule blocks. The result is clean, readable CSS.
How much does CSS minification save?
CSS minification typically reduces file size by 20-40% by removing whitespace, comments, and unnecessary semicolons. For production websites, this translates to faster page loads and lower bandwidth usage.
Does it handle media queries?
Yes. Media queries (@media), keyframes (@keyframes), and other at-rules are properly formatted with correct indentation. Nested rules inside media queries are indented one level deeper than the at-rule.
Can I use this for SCSS or LESS?
This tool handles standard CSS syntax. SCSS and LESS have additional syntax (variables, nesting, mixins) that may not format perfectly. For best results, compile SCSS/LESS to CSS first, then format the output.