CSS壓縮工具
移除CSS中的註解、空白和不必要的字元,以減小檔案體積。
如何使用本工具
- 1
Paste your CSS — a single rule, a component stylesheet, or an entire file.
- 2
The minified result and the byte savings appear instantly below the input.
- 3
Copy the minified output, or compare the before/after byte count to see the reduction.
什麼是CSS壓縮工具?
壓縮後的CSS載入更快:在關鍵渲染路徑上,每一個位元組都很重要。壓縮會移除註解、摺疊空白並簡化語法(例如,'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嗎?▼
我能期待多大的體積縮減?▼
相關工具
HTML壓縮工具
移除HTML中的空白和註解。適用於嵌入程式碼、郵件範本或生產環境的HTML。
JavaScript壓縮工具
基礎的JavaScript壓縮:移除註解和不必要的空白。生產環境請使用真正的壓縮工具(Terser、esbuild)。
正規表示式測試器
針對任意輸入測試JavaScript正規表示式。即時檢視符合項、擷取群組和取代結果。
雜湊產生器(MD5 / SHA)
產生加密雜湊:MD5、SHA-1、SHA-256、SHA-384和SHA-512。透過Web Crypto API在你的瀏覽器中執行。
UUID產生工具
線上產生UUID v4(通用唯一識別碼,隨機版)。每次點擊都會在你的瀏覽器中產生一個新的。
Unix時間戳記轉換工具
在Unix時間戳記與可讀日期之間互相轉換。即時更新。