Nouplo

CSS formatter

One declaration to a line, or the whole file on one.

Output
Paste or type above to see the result here.

Your files stay on your device

This tool runs entirely in your browser. What you paste is processed on your device and is never sent to a server, so it is safe to use with tokens, keys and unpublished text.

How it works

  1. Paste the CSS.
  2. Formatting puts each selector and each declaration on its own line, with a blank line between rules.
  3. Minifying strips the comments and every space that does nothing.
  4. Copy or download the result.

Frequently asked questions

What about a brace inside a string or a url()?
It is left alone. Strings and comments are read as single pieces before anything is split on braces, so content: "}" formats correctly instead of tearing the rule in half.
Does minifying keep the space in .a .b?
Yes. That space is the descendant combinator and means something; the spaces around a colon or a brace do not. Only the meaningless ones go.
Will a missing semicolon confuse it?
No. The last declaration in a block usually has no semicolon, and it gets one on the way out.
Does it reorder or shorten my properties?
No. Nothing is merged, shortened or moved — #ffffff stays #ffffff. This lays out what you wrote; it does not rewrite it.
Is anything sent to a server?
No. It runs in your browser, so what you paste stays on your computer.

Related tools