CSS Formatter
Pretty print CSS with one declaration per line, or minify it into a single compact line.
Your CSS
Rules: — · Declarations: —
How to use the CSS Formatter
- Paste the stylesheet you want to clean up.
- Pick an indent width and click Format, or click Minify to compact it.
- Copy the result with the Copy button.
Features
- One declaration per line with correct nesting
- At-rules and media queries indented properly
- One-click minify that keeps strings intact
- Runs locally, no uploads
Advertisement
Frequently Asked Questions
Common questions about the free online css formatter.
It rewrites a stylesheet so every declaration sits on its own indented line, which makes long
rules far easier to read and review.
At-rules such as media, supports and keyframes are detected automatically, so their inner
rules are indented one level deeper.
Yes. The Minify button strips comments and redundant whitespace while keeping quoted strings
and url values untouched.
No. Only whitespace between rules and declarations changes. Selectors, values, comments and
at-rules stay exactly as written.
Comments are kept and placed on their own line, or left inline when they sit inside a
declaration.
Yes. Content inside parentheses such as url data URIs is copied without splitting it at
semicolons or commas.
No. Everything runs in your browser, so your stylesheet never leaves your device.
Yes, the CSS formatter is completely free and unlimited, with no account or sign-up needed.
Last updated: October 10, 2026