CSS Formatter

  • Free forever
  • No sign-up
  • Runs in your browser
Processed on your device

Turn minified or messy CSS into clean, indented code with one property per line.

About CSS Formatter

Expands a minified stylesheet, or one written in a hurry, into clean CSS with one property per line and a blank line between rules. It helps when reading a theme's styles, reviewing code or finding a rule before you edit it. Comments are kept, nested SCSS-style blocks are indented properly, and you choose 2 spaces, 4 spaces or tabs, with optional wrapping of long lines.

How to use CSS Formatter

  1. Paste your minified or messy CSS, such as a stylesheet copied from a website, into the box.
  2. Choose an Indent of 2 spaces, 4 spaces or Tab, and whether to Wrap long lines.
  3. Click Format CSS to put each property on its own line, with a blank line between rules.
  4. Click Copy to use the tidy code, or Clear to format another stylesheet.

How your data is handled

Your CSS is formatted in your browser with the js-beautify library, loaded from our own site the first time. Nothing you paste is uploaded or stored.

How SAA Tool works · Privacy Center

Limits and accuracy

  • Syntax errors aren't reported; stray or missing braces are simply laid out as they are.
  • It changes layout only, so it won't remove duplicate rules or unused styles.

Questions and answers

Will formatting change how my CSS works?

No. Only spaces, indentation and line breaks change, so selectors, properties and values stay the same. The browser reads the formatted file exactly as it read the original.

Can I make the CSS smaller again afterwards?

Yes. When you've finished editing, paste it into CSS Minifier to remove spaces and comments and shorten values, which makes the file quicker to load.

Is my CSS uploaded?

No. Formatting runs in your browser, so your stylesheet isn't sent to SAA Tool or stored anywhere.

Do I need to sign up?

No. CSS Formatter and Beautifier is free with no sign-up, no login and no daily limit, and there's nothing to install. It works on a phone as well as a PC.

Can it expand one-line CSS?

Yes. Minified or single-line CSS is expanded with one declaration per line and consistent indentation, and it reformats Tailwind or any other CSS the same way.

Report a problem with this tool