CSS Formatter
Paste CSS, SCSS-compatible plain CSS or a minified stylesheet and get one declaration per line with consistent spacing.
Formatted
Paste code to format it.
About this tool
Production stylesheets are minified to save bytes, which makes debugging a specific rule painful. Beautifying puts every selector and declaration on its own line, normalises spacing around colons and braces, and keeps media queries and nested at-rules readable. Prettier also lower-cases hex colours and units consistently.
The formatter accepts standard CSS including custom properties, nesting, container queries and layer rules. It does not change the meaning of any rule; only whitespace and formatting are touched. Combine it with the CSS Minifier when you need to ship the result.
Frequently asked questions
- Will it reorder my properties?
- No. Order is preserved exactly; only whitespace and letter case of hex values change.
- Does it support SCSS or LESS?
- Plain CSS is fully supported. Most SCSS syntax parses too, but mixins and functions may error.
- Can I get four-space indentation?
- Yes, choose 4 spaces or tabs from the Indent menu.