CSS Formatter & Minifier
Beautify CSS with Prettier, or minify it for production. This tool beautifies and minifies CSS on one page — paste your code, pick a mode, and click. Everything runs on your device, nothing is sent to a server.
Everything runs in your browser. Your code is never sent to our servers.
Example
Example Input
a{color:red;margin:0}Example Output
a {
color: red;
margin: 0;
}How to Use
- 1Choose Format or Minify mode at the top.
- 2Paste your CSS code into the Input field.
- 3If needed, set the indent width in "More settings".
- 4Click the button (or press Ctrl+Enter) to process. The result appears in the Output field.
- 5Click Copy to copy the result.
About the CSS Formatter
The CSS Formatter beautifies stylesheets using Prettier — each property on its own line with consistent indentation — or minifies it by removing whitespace and comments.
How it works: Format runs Prettier with the CSS parser to consistently lay out rules and properties. Minify removes comments, excess whitespace, and unnecessary semicolons.
Clean CSS is easier to maintain; minified CSS reduces file size and speeds up page rendering. This tool also supports the SCSS and LESS variants.
FAQ
Can this CSS tool both format and minify?
Yes. One page with a toggle — Format mode prettifies (beautifies) with indentation, and Minify mode compacts it. No need for two separate pages.
Is my code sent to a server?
No. CSS is processed entirely in your browser using JavaScript/WebAssembly. Your code never leaves your device.