CSS 压缩工具 — Uttir
Skip to main content

CSS 压缩工具

通过去除注释、压缩空白和精简标点减小 CSS 体积,实时查看节省情况。

CSS 压缩工具 — CSS minification removes comments, collapses whitespace, drops the last semicolon in a rule, and tightens the spaces around punctuation. The result is a CSS file that is functionally identical to the source but typically 20-40% smaller.

CSS never leaves your browser.

Was CSS 压缩工具 useful?

CSS 压缩工具是什么?

CSS minification removes comments, collapses whitespace, drops the last semicolon in a rule, and tightens the spaces around punctuation. The result is a CSS file that is functionally identical to the source but typically 20-40% smaller.

Use this when you have a hand-written stylesheet and want a quick minified copy without setting up a build pipeline. For production projects, run your CSS through a proper tool (cssnano, lightningcss) as part of your build.

使用方法

  1. Paste your CSS

    A snippet, a file, or an entire stylesheet.

  2. Read the result

    The minified CSS appears instantly.

  3. Copy

    One click to put the minified CSS on your clipboard.

示例

Comment stripping

A simple comment-and-whitespace example.

/* header */ .a { color: red; }

结果: .a{color:red}

Punctuation tightening

Spaces around { } ; : , are removed.

a , b > c { color : red ; }

结果: a,b>c{color:red}

常见问题

Comparison: this tool vs the alternatives

Uttir CSS Minifier vs CSSNano (CLI)

FeatureUttirCSSNano (CLI)
No upload to a server✓✓
No signup / no install✓✗
No build pipeline required✓✗
Removes whitespace + comments✓✓
Advanced transforms (merge rules, optimize calc)✗✓
Run in browser, copy paste ready✓✗

相关指南

相关工具

Last reviewed: 2026-11-21