What is the CSS Formatter & Minifier?
Paste squashed CSS and get one rule per block with neat indents. It makes style sheets easy to read and compare.
Choose Minify to remove spaces, comments and the last semicolons, which shrinks the file for faster pages.
How to use it
- Paste your CSS in the left box.
- The clean version shows on the right.
- Copy it or save it as a file.
Why people like this tool
Prettier powered
The same formatter many teams use.
Fast and private
Runs in your browser, nothing is sent.
Shows the error
Tells you where the code is broken.
Your style
Choose indent size and line width.
When to format and when to minify
- Format (beautify) when you need to read, fix or compare a style sheet. This is the right choice for CSS you copied from a live site or got from a tool that squashes everything onto one line.
- Minify just before you publish. Spaces and comments are removed, so the file is smaller and the page can load a little faster.
Keep your readable copy as the file you edit. Do not edit the minified copy by hand.
Common mistakes this tool helps you spot
- A missing closing brace
}. The formatter stops and shows an error instead of guessing. - A missing semicolon between two rules.
- A rule placed in the wrong block, which becomes easy to see once each block has its own indent.
Formatting only changes spaces and line breaks. The page will look the same before and after.