Skip to developer tool

PIXELOKAY / DEVELOPER WORKSPACE

CSS Minifier & Optimization Studio

Optimise a stylesheet locally, compare the actual output, and export only what you reviewed. Modern CSS syntax is preserved—not automatically transpiled.

Open editor ↓

Optimize CSS

Runs in this browser · No source upload
UTF-8 · editable
Not calculated
Input → Minify → Inspect → Export
Ready. Paste CSS or load a local file.
Advanced settings & diagnostics
Safe mode never reorders selectors, changes custom-property values or rewrites import paths. Aggressive mode only merges consecutive identical selector blocks. It may still need real website regression testing.

Optimizer changes & caveats

  • Run Minify to see the exact transformations and warnings.

Diagnostics

No parser errors.
No result

How to use CSS Minifier & Compressor

  1. Paste CSS or load a .css file. The loader suggests a minified filename while leaving the original file unchanged.
  2. Choose Safe, Balanced or Aggressive. Preserve your required /*! notices; Advanced only merges immediately adjacent identical selectors.
  3. Minify locally in an on-demand background worker when available. Inspect the parser notes, raw UTF-8/gzip byte counts, and actual downloaded CSS.

When to use this tool

Reduce stylesheet source bytes for a build or a small standalone page. Keep license comments as required and test layout after optimization; minification alone does not measure compressed transfer size.

Minification, restructuring and transfer compression

Safe mode removes formatting and ordinary comments. Balanced additionally shortens safely recognized color and zero-length values. Aggressive also merges adjacent identical selector blocks without crossing other rules. Important exclamation comments are preserved by default; ordinary comments may be removed. The displayed byte saving compares the original and result encoded as UTF-8, before gzip or Brotli.

Worked example

Input: .card { color: #ffffff; margin: 0px 0px; }
Possible compact output: .card{color:#fff;margin:0}
Exact output can vary with the optimization preset.

Make a compact stylesheet while retaining the editable source

/*! Example project notice */
.card { padding: 16px; color: #ffffff; }
.card:hover { color: #eeeeee; }
  1. Use ordinary compiled CSS, such as this authored card example. Keep the original stylesheet and any Sass/Less source separately.
  2. Start with Basic and choose important-comment preservation deliberately. The example notice is practice text, not your project's license policy.
  3. Inspect declarations and notices. If choosing Advanced, review merged/restructured rules in the destination's actual cascade rather than relying only on byte reduction.
  4. Download a separate minified copy and review default/hover states in your own component before integrating it.

Authored CSS, no minified or performance result supplied. Raw UTF-8 savings do not measure gzip/Brotli transfers or loading time. Use Code Beautifier for readable formatting or Text Diff for source review.

Limits and output checks

CSS minification is not a complete performance audit. Savings depend on the input, and minification is different from server compression. Review advanced output against your actual pages, especially experimental CSS. Keep the original source; this page does not generate source maps or compile Sass/Less.

Reference: PostCSS grammar parser and source license.

Frequently asked questions

Should I keep important comments?

Keep required copyright and license notices. The default retains comments starting with /*!; it does not decide which notices your project must preserve.

Does a smaller byte count mean the page loads that much faster?

No. Network compression, caching, request latency and rendering affect real loading time. The statistic reports raw UTF-8 source bytes only.

Can I minify Sass or Less directly?

No. Compile those languages to ordinary CSS first, then minify the generated stylesheet.