Home / Tools / CSS beautifier

CSS Beautifier: Format and Indent CSS Online

Paste messy or minified CSS and get clean, indented code with one rule per line. Choose indent size and quote style. Runs in your browser.

Paste your CSS, press Beautify, and copy the clean result. Each selector and declaration goes on its own line with the indent you choose. It also reads SCSS-style nesting and handles minified files.

What it does

Example

Before

/* header */
body{margin:0;font-family:Arial,sans-serif}
.nav a:hover,.nav a:focus{color:#fff;background:#0a58ca}
@media (max-width:600px){.nav{display:none}}

After

/* header */
body {
  margin: 0;
  font-family: Arial, sans-serif;
}
.nav a:hover,
.nav a:focus {
  color: #fff;
  background: #0a58ca;
}
@media (max-width: 600px) {
  .nav {
    display: none;
  }
}

Frequently asked questions

Does it change what my CSS does?
No. It only changes spacing, line breaks and (if you choose) quote style. The rules and their order stay the same.
Can it format minified CSS?
Yes. Paste the minified file and press Beautify. Original comments are gone if the minifier removed them.
Does it work for SCSS and Less?
The formatter understands nested rules, so basic SCSS and Less usually works. It does not compile them to CSS.
What if it shows an error?
The message points to the part Prettier could not read, usually a missing brace or semicolon. Fix that spot and press Beautify again.

Runs in your browser. Nothing you type is sent to this site. Updated 2026-10-11.

More tools

Code formatters

CSS minifier HTML beautifier HTML minifier JavaScript beautifier JavaScript minifier JSON formatter YAML formatter XML formatter SQL formatter Markdown preview

Converters

Base64 encoder and decoder URL encoder and decoder Unix timestamp converter CSV to JSON JSON to CSV HTML entity encoder and decoder Number base converter Time zone converter JSON to TypeScript XML to JSON HTML to Markdown Date difference calculator

Text tools

Regex tester Remove duplicate lines Lorem ipsum generator Word counter Case converter Text diff checker

Color and images

Color converter Contrast checker Image to Base64 Image resizer

Network

Subnet calculator Download time calculator Common ports list CIDR to IP range IPv6 address expander and compressor MAC address formatter curl command builder

Server and files

Cron expression explainer chmod calculator HTTP status codes

Encoding and security

Password generator UUID generator Hash generator JWT decoder QR code generator Password strength checker Wi-Fi QR code generator