Free CSS Formatter

Beautify minified or messy CSS into a clean, readable stylesheet, entirely in your browser.

How to format CSS

  1. 1

    Paste your CSS

    Paste minified or inconsistently formatted CSS into the input box.

  2. 2

    Click "Format →" or "Minify →"

    Format expands it into a readable, indented stylesheet; Minify strips it down to a single compact line.

  3. 3

    Copy the result

    Click "Copy output" to grab the formatted or minified CSS for your stylesheet or build.

Example use cases

1

Reading minified stylesheets

Paste in CSS copied from a production build to see its rules and structure clearly.

2

Cleaning up generated CSS

Reformat CSS produced by a preprocessor or design tool before committing it to your codebase.

3

Shrinking CSS for production

Minify a hand-written stylesheet to cut file size before shipping it, when you don't have a build step handy.

Frequently asked questions

What does this formatter do?

It re-indents CSS so each selector, declaration, and closing brace sits on its own line with consistent spacing, and it can also minify — stripping whitespace and comments down to a single compact line.

Does it validate my CSS?

No. It reformats structure only — it doesn't check that property names or values are valid, so invalid CSS will still be reformatted rather than flagged.

Does it support nested CSS or @media rules?

Yes — nested blocks like @media, @supports, and @keyframes are indented one level deeper than the rules around them.

Is my CSS uploaded anywhere?

No. Formatting happens locally in your browser using JavaScript — nothing you paste is sent to a server.