JavaScript / CSS 壓縮工具
在瀏覽器中壓縮 JavaScript、CSS、HTML 和 JSON,並精確查看節省了多少空間。
使用方法
Select the language (JavaScript, CSS, HTML or JSON), paste your code and press Minify. JavaScript is parsed and minified with Terser, including identifier shortening. CSS and HTML use a conservative minifier that only removes comments and unnecessary whitespace — it never rewrites values, so rendering cannot change. The result shows the original size, the minified size and the saving percentage.
注意事項
Everything runs in your browser. The HTML minifier leaves the contents of pre, textarea, script and style elements untouched. Minified JavaScript is not obfuscation, and no aggressive optimizations such as property renaming are applied.
常見問題
Can the minified CSS change how a page renders?
No — the CSS minifier only strips comments and collapses whitespace; it never rewrites values.
Are sizes measured in characters?
In UTF-8 bytes, so multibyte characters count as more than one.