JavaScript Minification Benchmarks

Find metrics and comparison tables of the quality and speed of the most popular JavaScript minification tools.

Purpose

The purpose of these benchmarks is to serve the objectives:

  • To assist developers in selecting a JavaScript minification tool that is suitable for their project requirements;
  • To objectively rank the best solutions based on various metrics, such as minzipped size, execution time, and more;
  • To satisfy the curiosity of those interested in learning more about the performance of different JavaScript minifiers.

Minification benchmarks results

If you want to compare the performance of different JavaScript minifiers, you can consult the JS minification benchmarks table for data on the smallest minzipped size, execution time, and other relevant metrics.

react v17.0.2

ArtifactOriginal sizeGzip size
react v17.0.2 (Source)72.14 kB19.41 kB
MinifierMinified sizeMinzipped sizeTime
google-closure-compiler22.83 kB8.17 kB4030 ms
swc22.89 kB8.18 kB32 ms
uglify-js22.67 kB8.19 kB1029 ms
terser23.14 kB8.32 kB467 ms
babel-minify23.6 kB8.43 kB1596 ms
esbuild23.7 kB8.53 kB32 ms
tdewolff-minify23.53 kB8.62 kB4 ms
uglify-js.no-compress25.03 kB8.65 kB161 ms
terser.no-compress25.08 kB8.72 kB213 ms
minify-js23.46 kB9 kB6 ms

moment v2.29.1

ArtifactOriginal sizeGzip size
moment v2.29.1 (Source)173.9 kB36.15 kB
MinifierMinified sizeMinzipped sizeTime
uglify-js57.87 kB18.46 kB2305 ms
terser59.16 kB18.59 kB1287 ms
swc58.42 kB18.7 kB85 ms
google-closure-compiler58.27 kB18.75 kB4897 ms
babel-minify59.7 kB19.02 kB3151 ms
esbuild59.82 kB19.24 kB34 ms
tdewolff-minify59.94 kB19.42 kB10 ms
uglify-js.no-compress62.5 kB19.44 kB389 ms
terser.no-compress63.15 kB19.56 kB521 ms
minify-js60.74 kB20.82 kB18 ms

jquery v3.5.1

ArtifactOriginal sizeGzip size
jquery v3.5.1 (Source)287.63 kB84.37 kB
MinifierMinified sizeMinzipped sizeTime
uglify-js88.54 kB30.85 kB3194 ms
swc89.16 kB30.86 kB136 ms
terser89.54 kB30.9 kB1747 ms
tdewolff-minify89.85 kB31.44 kB14 ms
uglify-js.no-compress94.08 kB31.44 kB574 ms
terser.no-compress31.59 kB94.55 kB694 ms
babel-minify92.1 kB31.75 kB4820 ms
esbuild90.07 kB31.89 kB49 ms
google-closure-compiler92.7 kB32.98 kB5552 ms
minify-js90.51 kB33.2 kB28 ms