JS Minifier

Compress JavaScript instantly. Removes whitespace, comments, and optimizes variable names. Processed 100% in your browser — your code stays private.

JavaScript Input

Minified Output

100% Private

All processing happens in your browser via Terser.js. Your code is never sent to any server.

ES2020+ Support

Terserは、矢印関数、async/await、クラス、テンプレートリテラルなどの最新のJavaScriptをサポートしています。

Faster Page Load

JSを縮小すると、ファイルサイズが30〜70 %縮小され、インタラクティブ時間とコアWeb Vitalsスコアが向上します。

What is JavaScript Minification?

JavaScriptの縮小は、その機能を変更することなく、ソースコードから不要な文字をすべて削除するプロセスです。これには、空白、改行、コメント、および長い変数名が含まれます。これらは、より短い同等のものに置き換えられます。その結果、ダウンロードと解析が高速になりますが、機能的には元のファイルと同じになります。

This tool uses Terser — the industry-standard JavaScript minifier and the engine behind Webpack, Vite, and esbuild. Terser performs both minification (removing whitespace and comments) and mangling (renaming variables to shorter names like a, b, c), achieving reductions of 30–70% depending on code style. It fully supports ES2020+ syntax including async/await, optional chaining, and nullish coalescing.

JavaScriptを縮小すると、Core Web Vitalsが直接改善されます。より小さいJSバンドルは、インタラクティブまでの時間( TTI )と総ブロック時間( TBT )を削減します。これは、GoogleがLighthouseの監査で測定し、ランキングシグナルとして使用する2つの指標です。GoogleのPageSpeed Insightsは、未縮小のJavaScriptに「レンダリングブロックリソースを排除する」または「JavaScriptを縮小する」機会としてフラグを立てます。

When to Minify JavaScript

Minify JS when:

  • ✓ 本番環境へのデプロイ—常に最小化されたJSを提供
  • ✓ PageSpeed Insightsスコアには「JavaScriptを縮小」と表示されます
  • ✓ 事前に縮小されていないサードパーティのスクリプトの処理
  • ✓ Reducing payload for mobile users on slow connections
  • ✓ インタラクティブまでの時間( TTI )と合計ブロック時間の改善
  • ✓ 展開前に複数の小さなスクリプトを組み合わせる

Typical size reductions:

  • • Well-commented library: 50–70% reduction
  • • Typical application code: 30–50% reduction
  • • Already compressed or generated code: 10–20% reduction
  • • Additional gzip compression on top: further 60–80%

For maximum effect, minify first, then serve with gzip or Brotli compression from your web server.

よくある質問