How to Use the CSS Formatter: Steps and a Worked Example
Break minified CSS onto separate lines so it is easy to read. This guide shows what to enter, a worked example, and the limits to keep in mind. The CSS Formatter tool is free, needs no account and runs in your browser.
What you need
- CSS
Step by step
- Open the CSS Formatter tool.
- Fill in CSS.
- Read the result, which updates as soon as the inputs change.
Worked example
the tool returns:
.btn {
color: #fff;
background: #2563eb;
}
.btn:hover {
background: #1d4ed8;
}
How it works
Paste CSS. Each rule gets its own block, with one declaration per line indented by two spaces. Comments are removed and media queries are nested.
Things to keep in mind
Check your inputs, units and any local rules before you rely on the result.
Related tools
If this is not quite what you need, try JSON Formatter, CSS Border Radius Generator or CSS Box Shadow Generator.