Skip to content

Format CSS

Format and indent CSS code to make it readable, using the Prettier engine.

Processed on your device. Nothing is sent to any server.

Format compact or poorly indented CSS code to make it readable, using Prettier's formatting engine directly in your browser.

Uses the same formatting engine as Prettier to give CSS consistent indentation and spacing, including nested rules and multiple selectors.

Use cases

  • Formatting minified CSS so it can be read and edited.
  • Preparing a readable CSS snippet for documentation.
  • Visually reviewing the structure of a complex stylesheet.

How it works

  1. 1

    Paste your CSS

    Type or paste the CSS code into the input box.

  2. 2

    Format it

    Click Format and copy or download the result.

Frequently asked questions

Does it support SCSS or LESS?
The formatter is designed for standard CSS; preprocessor-specific syntax like SCSS or LESS may not format correctly.
Developer