Tool guide
About this tool.
Formatting puts each selector block on its own line and each declaration on its own indented line. Nested at-rules such as @media and CSS nesting rules are indented one level deeper.
The tool uses its own small tokenizer, so strings, comments, url() values and escapes are copied exactly as written.
Minify removes comments and layout whitespace. Comments that start with /*! are kept for licenses. Spaces that change meaning, such as in a b, 0 auto or and (, are kept.
Paste CSS or choose a sample.
Choose Format to indent the stylesheet, or Minify to remove comments and layout whitespace.
Pick 2 spaces, 4 spaces or tabs for Format mode.
Copy the result or save it as a CSS file.
- a{color:red;margin:0 auto} → a { color: red; margin: 0 auto; } with one declaration per line.
- @media (min-width:600px){a{b:c}} → the rule for a is indented inside the media block.
- a{content:"}{;"} → the string is kept intact.
- /* x */ a { color: #FFFFFF; } → a{color:#FFFFFF} in Minify mode.
- Processing is local; nothing is uploaded.
- Limits: 5,000,000 input characters and 100 nesting levels.
- Minify never transforms values: colors, units, zeros and shorthands stay as written.