RevealTheme logo

CSS圧縮ツール

CSSからコメント、空白、不要な文字を取り除いて、ファイルサイズを削減します。

このツールの使い方

  1. 1

    Paste your CSS — a single rule, a component stylesheet, or an entire file.

  2. 2

    The minified result and the byte savings appear instantly below the input.

  3. 3

    Copy the minified output, or compare the before/after byte count to see the reduction.

CSS圧縮ツールとは何ですか?

圧縮されたCSSはより速く読み込まれます。クリティカルレンダリングパスでは1バイトたりとも無駄にできません。圧縮はコメントを取り除き、空白をまとめ、構文を簡略化します(たとえば'color: #ffffff'は'color:#fff'になります)。本番環境のサイトでは、cssnanoのようなビルド時の圧縮ツールを使ってください。このツールは、単発のCSSの断片向けです。

よくある活用例

  • Shrink a critical-CSS snippet you're inlining into the <head> to remove a render-blocking request.

  • Compress CSS for an HTML email or newsletter, where every kilobyte counts and there's no build pipeline.

  • Paste CSS into a CMS or page-builder field that doesn't minify automatically (WordPress 'Additional CSS', Shopify theme settings).

  • Check how much weight a third-party stylesheet adds before deciding whether to self-host it.

  • Clean up CSS copied from DevTools, which arrives with computed-style comments and inconsistent spacing.

  • Produce a one-line version of a rule to paste into a chat, ticket, or code-review comment.

よくある質問

圧縮するとCSSが壊れませんか?
壊れません。圧縮は意味を保持します。もしCSSが壊れるなら、元のソースにブラウザは許容していたものの圧縮ツールは許容しない構文エラーがあったということです。
どのくらいのサイズ削減が見込めますか?
手書きの一般的なCSSなら20%から40%です。フレームワークの、すでに圧縮されたCSSでは削減幅は小さくなります。

関連ツール