Developer Tools

CSS Formatter with Worked Examples

Break minified CSS onto separate lines so it is easy to read. Enter css and read the result straight away. “.btn{color:#fff;background:#2563eb}” becomes a .btn rule with “color: #fff;” and “background: #2563eb;” on separate indented lines.

01

Your inputs

Start with the example, or enter your own values.

Processed in your browser. Your inputs stay on this device.

02

Your result

A little clarity, coming right up.

Make room for the answer.

Enter your values and run the tool. Your result will appear here.

How to use the CSS Formatter

Paste CSS. Each rule gets its own block, with one declaration per line indented by two spaces. Comments are removed and media queries are nested.

Examples

  • With the default values
    .btn {
      color: #fff;
      background: #2563eb;
    }

Limitations and assumptions

Confirm assumptions, units and applicable local rules before relying on results. Detailed content, accessibility and edge-case review remains ongoing.

Frequently asked questions

What does the CSS Formatter do?

Break minified CSS onto separate lines so it is easy to read.

How does the CSS Formatter work?

Paste CSS. Each rule gets its own block, with one declaration per line indented by two spaces. Comments are removed and media queries are nested.

What should I keep in mind when using the CSS Formatter?

Confirm assumptions, units and applicable local rules before relying on results.

Can I see an example of the CSS Formatter?

“.btn{color:#fff;background:#2563eb}” becomes a .btn rule with “color: #fff;” and “background: #2563eb;” on separate indented lines.

Is the CSS Formatter free to use?

Yes. It is free, needs no account and runs in your browser.