CSS Formatter
Turn compressed or messy CSS into clean, readable stylesheets: one declaration per line, selectors on their own lines, @media blocks nested with proper indentation, comments preserved.
- 100% Free
- No Registration
- Works in Your Browser
CSS Formatter
This tool's workspace loads here.
How to Use
- Paste your CSS into the input box.
- Choose an indent size.
- Click Format CSS.
- Copy the formatted stylesheet.
About This Tool
Turn compressed or messy CSS into clean, readable stylesheets: one declaration per line, selectors on their own lines, @media blocks nested with proper indentation, comments preserved. Ideal before editing someone else's stylesheet or reviewing your own.
Frequently Asked Questions
Does it change what the CSS does?
No — only whitespace and line breaks change. Every selector, property and value stays exactly the same.
Is my code uploaded?
No. Formatting happens in your browser.
Does it handle @media and @keyframes?
Yes. Nested blocks are indented by depth, so media queries and keyframe steps nest correctly.