开发者工具

Minify JavaScript online

Minify JavaScript code quickly in your browser.

全部工具

JS Minifier

Upload file
Drag & drop a file here, or choose a file.
输入
输出

使用方法

  1. Paste JavaScript into the input.
  2. Click Minify to compress the code.
  3. Copy or download the output.

Best practices

  • For best performance, try with smaller inputs first.
  • Preview the output before downloading or sharing it.
  • Avoid pasting sensitive data on shared devices.

隐私

部分工具在浏览器内运行。某些功能可能需要服务器处理。

示例
Example 1
输入
function hello(name) {
  // say hi
  console.log('Hello ' + name);
}
hello('ToolsOnline');
输出

                                    
Example 2
输入
const items = [1, 2, 3];
items.forEach((x) => {
  if (x % 2 === 0) {
    console.log(x);
  }
});
输出

                                    

Was this tool helpful?