JavaScript 压缩

删除 JavaScript 中的注释和空格。

在您的浏览器中运行。您的文件不会离开设备。 了解如何验证

…

使用方法

  1. 1
    填写各项

    输入数字或选择所需选项。

  2. 2
    查看结果

    更改任何值时,答案会立即更新。

  3. 3
    使用结果

    复制结果或记下来。不会向任何地方发送任何内容。

About this tool

Paste your JavaScript and the tool removes comments and unnecessary whitespace while keeping strings, template text and regular expressions safe. This is a light minifier: it does not rename variables. For the smallest possible file use a build tool, but this is quick for small scripts and snippets.

When to use it

Remove comments and spaces from JavaScript.

Tips

Use a full build tool for large projects.

Privacy

Everything runs in your browser, so your data is not uploaded or stored.

What it does not do

This simple minifier removes comments and extra whitespace. It does not rename variables or remove dead code, so the saving is smaller than with a full build tool. Always test the minified script.

获得最佳结果的提示

在相信结果之前先检查每一个输入项,因为一个错误的数字就会改变整个答案。请使用工资单、账单、证书或合同上的准确数字,并记下计算日期。税率、门槛和规则会不时变化,因此对于税费和法律事务,请将结果视为估算,并与本页注明的官方来源核对。您可以尝试任意多个方案;不会保存或发送任何内容,刷新页面会清空输入。

要点

将此计算器嵌入您的网站

复制此代码,即可在您的页面上显示计算器。包含指向 shobfree.com 的链接。

常见问题

Does it rename my variables?

No. It only removes comments and extra whitespace, so the code stays readable to debug.

Is my code uploaded?

No. Everything runs in your browser.

Does it rename variables?

No. It only removes comments and spaces.

Is it safe?

It keeps the logic unchanged.

Is the minified file safe to use?

Test it, since removing line breaks can matter in rare cases without semicolons.

完全免费无费用,无需注册
文件保持私密一切都在您的浏览器中运行
用您的语言轻松使用提供多种语言