How to use CSS Formatter
Format CSS rules, declarations and nested selectors with predictable indentation and spacing.
- Paste CSS into the source editor.
- Select Format code.
- Copy or download the formatted stylesheet.
Example
Input
h1{color:red;margin:0}
Result
h1 {\n color: red;\n margin: 0;\n}
Important to know
Formatting does not validate the browser support of CSS properties or change their runtime behavior.