CSS / SCSS Formatter

Beautify or minify CSS/SCSS/LESS, sort properties and remove duplicates.

Your CSS is formatted locally in your browser and nothing is uploaded to a server.

Need to beautify JavaScript too? Try the JS Formatter.

About CSS / SCSS Formatter

This css formatter beautifies or minifies CSS, SCSS and LESS using Prettier, with options to sort declarations alphabetically and remove duplicate properties. Use it as a css beautifier to clean up messy stylesheets, or as a scss formatter and less formatter when working across preprocessors. Switch to minify mode to strip comments and whitespace and produce compact production CSS. It is built for front-end developers, designers and QA engineers who need consistent, readable styles or a quick way to format css online before a commit or code review. You can choose tabs or spaces for indentation, pick the syntax that matches your file, and reuse the prettier css output anywhere. Everything is processed locally in your browser, so your stylesheets never leave your device and nothing is uploaded to a server.

Features

How to use the CSS / SCSS Formatter

  1. Paste your CSS, SCSS or LESS into the input box.
  2. Choose the syntax mode (CSS, SCSS or LESS) that matches your file.
  3. Select Beautify to format or Minify to compact the output.
  4. Toggle Sort props, Dedupe or Tabs to fine-tune the result.
  5. Copy or download the formatted CSS from the output panel.

Example

Input

.btn{color:#FFF;padding:8px;color:#fff;}

Output

.btn {
  color: #fff;
  padding: 8px;
}

Beautify mode with duplicate declarations removed.

Common errors & troubleshooting

Frequently asked questions

What is the ArrayKit CSS Formatter?
It is a browser-based css formatter that beautifies or minifies CSS, SCSS and LESS with Prettier, and can sort properties alphabetically and remove duplicate declarations in plain CSS.
How do I minify CSS with the CSS Formatter?
Paste your stylesheet, choose the matching syntax mode, then select Minify to strip comments and whitespace and produce compact production CSS you can copy or download.
Does the CSS Formatter support SCSS and LESS?
Yes. Pick the syntax (CSS, SCSS or LESS) and it parses accordingly. Property sorting and de-duplication apply to plain CSS.
Can the CSS Formatter sort properties alphabetically?
Yes. In Beautify mode with CSS selected, toggle Sort props to reorder declarations alphabetically within each rule.
What engine formats the CSS?
Beautifying uses Prettier, so the output matches the same conventions Prettier applies in your editor and build tools.
Is my CSS uploaded anywhere by the CSS Formatter?
No. The css formatter runs entirely in your browser, so your stylesheets are processed locally and never leave your device.

Related tools

All ArrayKit tools