About this tool
Paste a minified stylesheet or a quick hack and get back tidy rules, one declaration per line, with media queries and nested blocks indented. SCSS and Less syntax are supported alongside plain CSS. Formatting uses the Prettier engine running inside your browser, so stylesheets are never uploaded.
How to use CSS Formatter
- Paste your stylesheet into the left box.
- Choose CSS, SCSS or Less.
- Set indentation, line width and quote style.
- Copy the result or download the file.
Frequently asked questions
Will formatting change how my styles behave?
No. Only whitespace, line breaks and quote style change. Selectors, values and the order of rules stay the same.
Why do I get a syntax error?
Usually a missing brace or semicolon, or SCSS features used with the CSS parser selected. Switch the syntax setting if your file uses nesting or variables.