CSS Minifier
Compress CSS to its smallest equivalent form by removing comments, collapsing whitespace, and stripping the trailing semicolon before each closing brace.
ツール要約
このツールは構造化された入力を受け取り、サーバーへアップロードせずにブラウザで決定的な出力を返します。
- ツール名
- CSS Minifier
- 入力の目的
- 変換・検証・分析するソースコンテンツを入力してください。
- 出力の目的
- コピー・再利用・デバッグに適した正規化された出力を受け取ります。
- 入力例
- /* primary button */ .btn { color: red; padding: 8px 16px; }
- 出力例
- .btn{color:red;padding:8px 16px}
url(...), and quoted values are preserved.ツールの紹介
Compress CSS to its smallest equivalent form by removing comments, collapsing whitespace, and stripping the trailing semicolon before each closing brace.
ツール概要
CSS minification removes characters the browser does not need to render styles correctly. This tool strips /* ... */ comments, collapses runs of whitespace outside of strings, and removes whitespace around structural punctuation ({ } : ; , >). Strings inside url(...) and quoted values are preserved exactly. Byte counts before and after are reported so you can see the savings at a glance. Everything runs in your browser.
ユースケース
- Inline critical CSS into <head> with the minimum possible bytes.
- Quickly compress hand-written CSS without spinning up a build pipeline.
- Squeeze additional bytes out of stylesheets already processed by Tailwind or PostCSS.
入力/出力の例
/* primary button */
.btn {
color: red;
padding: 8px 16px;
}.btn{color:red;padding:8px 16px}よくある質問
Will minification break url() values or strings?+
Does it support nested CSS or @media blocks?+
Will it rename selectors or shorten colors?+
他のツールを見る
下記の Developer カテゴリで関連ユーティリティを探す。
関連ツール
役に立ちそうな厳選ユーティリティ