Web Dev

CSS Minifier

Minify or beautify CSS code.

How to use it

  1. Open Devly from the wrench in your menu bar, or press ⌃⌥⌘D. Press ⌘P, type CSS Minifier and press Return.
  2. Choose Minify or Beautify at the top.
  3. Paste or type your text into Input.
  4. Adjust the Options on the right if you need to. The defaults are listed below.
  5. Press Minify, or ⌘↵.
  6. To go the other way, press Swap or ⌘S. The output moves into the input.
  7. Use Copy or ⇧⌘C to copy the result. ⌘L clears everything.

Options

OptionValuesDefault
Indent SpacesIndentation for beautify mode1–82
Remove commentsStrip CSS commentsOn or offOn
Compress colorsShorten hex colors (e.g., #ffffff → #fff)On or offOn

Example

Real output from Devly, with the default options.

Input
.button {
  color: #ffffff;
  background: #0a84ff;
  border-radius: 980px;
  padding: 12px 22px;
}

.button:hover {
  background: #0077ed;
}
.button { color:#fff;background:#0a84ff;border-radius:980px;padding:12px 22px}.button:hover { background:#0077ed}

From Terminal

With the free command-line tool installed:

Terminal
devly css --path input.txt
# or pipe text in
pbpaste | devly css

Quick Switch also finds it by: css, minify, beautify, compress, style, stylesheet.

More Web Dev tools