Skip to content
Code Formatters

CSS Formatter & Minifier

Format CSS into clean, readable code, or minify it to make it smaller. Free online CSS beautifier that runs in your browser.

Something not working? Report a problem

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

  1. Paste your CSS in the left box.
  2. The clean version shows on the right.
  3. 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.

How it works, in one picture

Infographic: how to use the CSS Formatter & Minifier in 3 easy steps: Paste your code, Choose your options and Copy the result. You get: Prettier powered, Fast and private, Shows the error and Your style.

Frequently asked questions

How do I beautify CSS?
Paste your CSS in the left box. The right box shows it with one property on each line.
Will minified CSS work the same?
Yes. Minify only removes spaces and comments. Special comments that start with /*! are kept.
Does it work with media queries?
Yes. Media queries, keyframes and nested blocks are all formatted.

You may also like