Does this indent nested @media rules by depth?
It line-breaks their contents, but doesn't add extra indentation reflecting the nesting depth like a fully CSS-aware formatter would.
Add readable line breaks to a minified or dense CSS snippet, right in your browser.
This formatter adds a line break after each opening brace, semicolon, and closing brace, and after commas in selector lists, turning a minified stylesheet into a spread-out, readable version. It's a flat, regex-based text transformation rather than a real CSS parser — nested rules like `@media` queries get their inner declarations broken onto lines the same way as top-level rules, but without extra indentation reflecting that nesting depth.
For typical, flat CSS rules, this produces a clean, readable result. For heavily nested `@media` or `@supports` blocks, the output is still line-broken but reads more flatly than a fully depth-aware formatter would produce.
Use this quick flow to understand where the tool fits in your work and what to review before relying on the output.
Use it to quickly turn minified CSS — copied from a browser's dev tools or a build output — into something readable enough to scan property by property.
Reformat a stylesheet copied from a browser's dev tools or minified build output.
Format copied CSS to discuss a styling bug more clearly.
See declarations broken onto clear lines while learning the syntax.
Quickly reformat a short block of CSS before adding it to a project.
Adds a new line after {, ;, }, and commas in selector lists.
Works cleanly on typical, non-nested selector and declaration blocks.
A lightweight text transformation, not a build tool or CSS parser.
Output updates as you paste or edit the input.
Reformatting a stylesheet copied from a browser's dev tools or minified build output.
Formatting copied CSS to discuss a styling bug more clearly.
Seeing declarations broken onto clear lines while learning CSS syntax.
Quickly reformatting a short block of CSS before adding it to a project.
Formatting happens entirely in your browser using pattern-based text processing — nothing you paste is sent to a server.
Nested @media or @supports blocks get line breaks but not extra indentation reflecting their nesting depth.
It reformats text based on patterns — it doesn't check that your CSS is syntactically correct.
Comments aren't given special handling in the formatting pass.
For production stylesheets, use a proper tool like Prettier that understands CSS's actual structure.
CSS Beautifier makes typical, flat CSS rules easy to scan quickly. For deeply nested @media blocks or a fully depth-aware result, a real CSS-aware formatter like Prettier will do a more thorough job.
Use this tool for quick work. If you need a real file prepared, a page reviewed, or a website issue fixed, send the URL and describe the problem.
FAQ
Answers for using CSS Beautifier on I Love Tool XYZ.
It line-breaks their contents, but doesn't add extra indentation reflecting the nesting depth like a fully CSS-aware formatter would.
No, it only reformats text based on patterns — it doesn't check correctness.
They aren't given special handling, so review them after formatting.
No. Formatting happens entirely in your browser.