CSS Formatter
Format CSS with 2-space indent. Clean selectors, aligned properties, readable output.
FormatBeautifyClient-sideUnlimited
0 / 500,000
How to use
- Paste your CSS. Any CSS, minified or messy.
- Copy the formatted output. Pretty CSS with aligned properties.
Common use cases
- Reading minified stylesheets
- Auditing CSS from design tools
- Cleaning up copy-pasted CSS
Frequently asked questions
- Will this formatter touch CSS Custom Properties or @rules?
- It preserves them. CSS Custom Properties (--var), media queries, @keyframes, @supports, @container, @layer, and other at-rules all carry through correctly indented.
- Does it support modern CSS features?
- Yes. Nested selectors, container queries, cascade layers, color-mix(), :has(), and the rest of the modern CSS spec are formatted as-is. The tool does not strip or rewrite any properties.
- Will it sort or alphabetize properties?
- No. Property order is preserved exactly as you wrote it because order matters for the cascade and for readability conventions you may have chosen.
- Can I minify the CSS instead?
- Use the dedicated CSS Minifier page. The Formatter and Minifier are intentionally separate slugs so each can rank independently.
- Does it format SCSS or Less syntax?
- Plain CSS only. SCSS-specific syntax (variables, mixins, nesting beyond CSS Nesting) and Less features may format incorrectly. Use a SCSS or Less specific tool for those.
Related tools
How to use
- Paste your CSS. Any CSS, minified or messy.
- Copy the formatted output. Pretty CSS with aligned properties.
Common use cases
- Reading minified stylesheets
- Auditing CSS from design tools
- Cleaning up copy-pasted CSS
Frequently asked questions
- Will this formatter touch CSS Custom Properties or @rules?
- It preserves them. CSS Custom Properties (--var), media queries, @keyframes, @supports, @container, @layer, and other at-rules all carry through correctly indented.
- Does it support modern CSS features?
- Yes. Nested selectors, container queries, cascade layers, color-mix(), :has(), and the rest of the modern CSS spec are formatted as-is. The tool does not strip or rewrite any properties.
- Will it sort or alphabetize properties?
- No. Property order is preserved exactly as you wrote it because order matters for the cascade and for readability conventions you may have chosen.
- Can I minify the CSS instead?
- Use the dedicated CSS Minifier page. The Formatter and Minifier are intentionally separate slugs so each can rank independently.
- Does it format SCSS or Less syntax?
- Plain CSS only. SCSS-specific syntax (variables, mixins, nesting beyond CSS Nesting) and Less features may format incorrectly. Use a SCSS or Less specific tool for those.