CSS Formatter
Beautify or minify CSS online. Pretty-print with configurable indentation or compress to a single line.
What Is CSS Formatter?
CSS Formatter is an online tool that beautifies or minifies CSS code. Paste any CSS and instantly get a properly indented, human-readable version — or compress it to a single line for production use. No server required; all processing runs in your browser.
How to Use
- Paste your CSS into the input area
- Click Beautify to pretty-print with configurable indentation
- Click Minify to compress to a single line
- Copy the output with the Copy button
Features
- Beautify with 2 or 4 space indentation
- Minify: removes comments, collapses whitespace, removes redundant semicolons
- Shows original vs. output size and compression ratio
- Runs entirely in the browser
FAQ
Does minification affect how CSS works?
No. Minification only removes whitespace and comments — it does not change the rules or selectors. The resulting CSS is functionally identical to the original.
Are CSS variables and custom properties supported?
Yes. The formatter treats CSS variables (--my-var) as regular property values and preserves them correctly.
Does it support SCSS or Less?
Basic formatting works for SCSS/Less since they share CSS syntax, but nested rules and preprocessor-specific syntax may not format perfectly.