Skip to content
ToolMug

CSS Formatter

Turn minified or messy CSS into readable, consistently indented style sheets. SCSS and Less are supported too, including nesting, variables and mixins.

Runs in your browser — nothing you enter is uploaded

How to use

  1. Paste your CSS, SCSS or Less.
  2. Choose the language and indentation.
  3. Click Format, or press Ctrl+Enter (⌘+Enter on Mac).
  4. Copy the formatted style sheet.

Options explained

Language
CSS, SCSS or Less. Pick the right one so variables ($gap, @gap) and nested rules are understood.
Indent and line width
Indentation for nested rules and declarations, and the width at which long selector lists and values wrap.

Examples

Minified framework CSS. Paste a single-line .min.css file to read the rules one by one.

SCSS cleanup. Paste nested SCSS with mixed indentation and get consistent two-space nesting.

Frequently asked questions

What does formatting change?

It puts each declaration on its own line, normalises spacing around colons and braces, lower-cases hex colours and collapses runs of blank lines into one. Property order and values are not changed.

Can I un-minify CSS from a website?

Yes. Paste the minified file and click Format. Comments removed by the minifier cannot be recovered.

Is my code uploaded?

No. Formatting runs in your browser.

Privacy

This tool runs entirely in your browser. Your files and text are processed on your device and are never uploaded to our servers.

Related tools