CSS Formatter
Paste CSS to pretty-print each rule and property onto its own line, or minify it down to the smallest possible size for production. Runs entirely in your browser.
Developer Tools Runs entirely in your browser
The code is processed entirely on your device and is never sent to any server.
Result
—
What this tool does
Reformats CSS with each declaration on its own line at a consistent indentation, or minifies it to the smallest size.
When to use it
- A minified stylesheet you want to read or edit.
- Style rules copied from somewhere that arrived unformatted.
- Normalising a stylesheet written by several people.
- Minifying CSS before publishing.
How to use it
- Paste the CSS into the field.
- Click "Format" or "Minify".
- Copy the "Result".
A practical example
Input
A CSS rule minified onto one line with several declarations.
Output
The same rule with each declaration on its own indented line and the braces on theirs.
Limitations
- This formats and does not validate properties or flag invalid values.
- Comments are kept but their position can shift after formatting.
- Minifying removes comments and whitespace, so keep the formatted version for working on.
Privacy and processing
The code is processed entirely on your device and is never sent to any server.
Technical notes
- The formatting is purely textual and neither reorders rules nor merges similar ones.