Skip to content

🏃‍♂️🏃‍♀️🏃 JS minification benchmarks: babel-minify, esbuild, terser, uglify-js, swc, google closure compiler, tdewolff/minify, oxc-minify

License

Notifications You must be signed in to change notification settings

privatenumber/minification-benchmarks

Repository files navigation

minification benchmarks

What's the best JavaScript minifier?

This project benchmarks the following minifiers:

Minifier Version Release date ↓
google-closure-compiler 20250805.0.0 2025-08-07
@tdewolff/minify 2.23.11 2025-08-06
oxc-minify 0.81.0 2025-08-06
@swc/core 1.13.3 2025-07-29
@cminify/cminify-linux-x64 3.0.1 2025-07-27
esbuild 0.25.8 2025-07-19
bun 1.2.19 2025-07-19
terser 5.43.1 2025-06-19
uglify-js 3.19.3 2024-08-29
babel-minify 0.5.2 2022-05-06
tedivm/jshrink 1.8.0

Benchmarks last updated on Aug 7, 2025.


🙋‍♂️ Why?

  1. To help you pick a minifier that fits your needs
  2. To promote JS minifiers and document their performances
  3. To encourage healthy competition and improvement amongst minifiers

👟 Methodology

  • Each minifier is executed in its own process with a 10s timeout
  • Artifact integrity is verified by a test before and after minification
  • Each minifier is minimally configured (sourcemaps & comments disabled), comparing out-of-the-box experience
  • Minifier upgrade PRs are automated via WhiteSource Renovate
  • Benchmarks are updated on every PR via GitHub Actions
  • The raw benchmark data is available in /packages/data/data/data.json

⏱ Metrics

Ranking

For each benchmark, minifiers are ranked by a score that reflects the best balance of trade-offs.

The score combines minzipped size and minification time, with size weighted more heavily by default (85% size, 15% time) since it's usually the top priority. If a minifier is unusually slow, the weights shift toward time using a logistic sigmoid function, up to a 50/50 split. This avoids harsh cutoffs while still penalizing extreme slowness.

Both size and time are scaled using min-max normalization so they can be compared fairly. The result is a context-aware score that helps surface the best overall choice—but make sure to check each column directly if size or speed matters more to you.

Minified size

Size of the minified output.

Minzipped size

Size of the minified output with Gzip compression.

For minifiers, this measures how compressable the output is.

For users, this measures network transfer size, which is usually the metric that matters most.

Time

How long minification took (average of 5 runs). Each time is annotated with a multiplier relative to the fastest minifier.

📋 Results

Tip

What's the verdict? ⚔️ See the Minifier showdown

---
config:
    xyChart:
        width: 720
        height: 360
        xAxis:
            labelPadding: 20
        yAxis:
            labelPadding: 10
---
xychart-beta
	title "react v17.0.2"
	x-axis ["Original",1,2,3,4,5,6,7,8,9,10,11,12,13]
	y-axis "Gzip size" 0 --> 19385
	bar [19385,8186,8255,8177,8487,8543,8739,8668,8628,8661,8448,8216,11040,10858]
Loading
Artifact Original size Gzip size
react v17.0.2 (Source) 72.13 kB 19.39 kB
Minifier Minified size Minzipped size Time
1. @swc/core -68% 22.81 kB -58% 8.19 kB 4x 12 ms
2. terser -68% 23.05 kB -57% 8.26 kB 108x 275 ms
3. uglify-js 🏆-69% 22.64 kB 🏆-58% 8.18 kB 197x 497 ms
4. oxc-minify -67% 23.51 kB -56% 8.49 kB 1x 3 ms
5. esbuild -67% 23.70 kB -56% 8.54 kB 5x 14 ms
6. terser (no compress) -65% 25.06 kB -55% 8.74 kB 46x 118 ms
7. uglify-js (no compress) -65% 25.03 kB -55% 8.67 kB 36x 91 ms
8. @tdewolff/minify -67% 23.49 kB -55% 8.63 kB 🏆 3 ms
9. bun -67% 23.99 kB -55% 8.66 kB 5x 13 ms
10. babel-minify -67% 23.60 kB -56% 8.45 kB 256x 647 ms
11. google-closure-compiler -68% 22.84 kB -58% 8.22 kB 1312x 3,309 ms
12. tedivm/jshrink -43% 40.82 kB -43% 11.04 kB 49x 126 ms
13. @cminify/cminify-linux-x64 -44% 40.04 kB -44% 10.86 kB 4x 12 ms

---
config:
    xyChart:
        width: 720
        height: 360
        xAxis:
            labelPadding: 20
        yAxis:
            labelPadding: 10
---
xychart-beta
	title "moment v2.29.1"
	x-axis ["Original",1,2,3,4,5,6,7,8,9,10,11,12,13]
	y-axis "Gzip size" 0 --> 36231
	bar [36231,18747,19260,19333,18689,19478,19651,19569,18568,19857,19119,18923,24998,24744]
Loading
Artifact Original size Gzip size
moment v2.29.1 (Source) 173.90 kB 36.23 kB
Minifier Minified size Minzipped size Time
1. @swc/core -66% 58.42 kB -48% 18.75 kB 5x 30 ms
2. oxc-minify -66% 59.51 kB -47% 19.26 kB 1x 9 ms
3. esbuild -66% 59.82 kB -47% 19.33 kB 4x 22 ms
4. terser -66% 59.01 kB -48% 18.69 kB 126x 693 ms
5. @tdewolff/minify -66% 59.87 kB -46% 19.48 kB 🏆 5 ms
6. terser (no compress) -64% 63.01 kB -46% 19.65 kB 52x 289 ms
7. uglify-js (no compress) -64% 62.50 kB -46% 19.57 kB 39x 215 ms
8. uglify-js 🏆-67% 57.73 kB 🏆-49% 18.57 kB 209x 1,149 ms
9. bun -64% 61.84 kB -45% 19.86 kB 3x 17 ms
10. babel-minify -66% 59.70 kB -47% 19.12 kB 267x 1,465 ms
11. google-closure-compiler -66% 58.29 kB -48% 18.92 kB 672x 3,682 ms
12. tedivm/jshrink -44% 97.63 kB -31% 25.00 kB 51x 284 ms
13. @cminify/cminify-linux-x64 -45% 95.93 kB -32% 24.74 kB 1x 10 ms

---
config:
    xyChart:
        width: 720
        height: 360
        xAxis:
            labelPadding: 20
        yAxis:
            labelPadding: 10
---
xychart-beta
	title "jquery v3.5.1"
	x-axis ["Original",1,2,3,4,5,6,7,8,9,10,11,12,13]
	y-axis "Gzip size" 0 --> 84498
	bar [84498,30866,30966,31446,31470,31555,31954,30856,32653,30903,31799,40879,33092,40365]
Loading
Artifact Original size Gzip size
jquery v3.5.1 (Source) 287.63 kB 84.50 kB
Minifier Minified size Minzipped size Time
1. @swc/core -69% 89.17 kB -63% 30.87 kB 5x 47 ms
2. oxc-minify -69% 89.34 kB -63% 30.97 kB 1x 15 ms
3. @tdewolff/minify -69% 89.68 kB -63% 31.45 kB 🏆 9 ms
4. uglify-js (no compress) -67% 94.08 kB -63% 31.47 kB 36x 314 ms
5. terser (no compress) -67% 94.26 kB -63% 31.56 kB 43x 373 ms
6. esbuild -69% 90.07 kB -62% 31.95 kB 4x 36 ms
7. terser -69% 89.24 kB 🏆-63% 30.86 kB 106x 921 ms
8. bun -68% 92.55 kB -61% 32.65 kB 3x 28 ms
9. uglify-js 🏆-69% 88.45 kB -63% 30.90 kB 184x 1,593 ms
10. babel-minify -68% 92.10 kB -62% 31.80 kB 276x 2,398 ms
11. tedivm/jshrink -50% 144.14 kB -52% 40.88 kB 41x 361 ms
12. google-closure-compiler -68% 92.73 kB -61% 33.09 kB 472x 4,090 ms
13. @cminify/cminify-linux-x64 -51% 141.45 kB -52% 40.37 kB 2x 22 ms

---
config:
    xyChart:
        width: 720
        height: 360
        xAxis:
            labelPadding: 20
        yAxis:
            labelPadding: 10
---
xychart-beta
	title "vue v2.6.12"
	x-axis ["Original",1,2,3,4,5,6,7,8,9,10,11,12,13]
	y-axis "Gzip size" 0 --> 89668
	bar [89668,42730,43348,44358,44368,44450,44636,42870,45400,43036,43925,44184,57169,56356]
Loading
Artifact Original size Gzip size
vue v2.6.12 (Source) 342.15 kB 89.67 kB
Minifier Minified size Minzipped size Time
1. @swc/core -66% 115.69 kB 🏆-52% 42.73 kB 5x 65 ms
2. oxc-minify -66% 117.22 kB -52% 43.35 kB 1x 18 ms
3. @tdewolff/minify -66% 117.69 kB -51% 44.36 kB 🏆 13 ms
4. esbuild -65% 118.14 kB -51% 44.37 kB 3x 42 ms
5. uglify-js (no compress) -63% 126.14 kB -50% 44.45 kB 28x 364 ms
6. terser (no compress) -63% 126.39 kB -50% 44.64 kB 34x 442 ms
7. terser -66% 116.60 kB -52% 42.87 kB 88x 1,143 ms
8. bun -64% 121.50 kB -49% 45.40 kB 2x 29 ms
9. uglify-js 🏆-67% 113.80 kB -52% 43.04 kB 171x 2,206 ms
10. babel-minify -66% 117.90 kB -51% 43.93 kB 209x 2,696 ms
11. google-closure-compiler -66% 115.61 kB -51% 44.18 kB 350x 4,521 ms
12. tedivm/jshrink -42% 197.36 kB -36% 57.17 kB 37x 478 ms
13. @cminify/cminify-linux-x64 -43% 193.91 kB -37% 56.36 kB 1x 23 ms

---
config:
    xyChart:
        width: 720
        height: 360
        xAxis:
            labelPadding: 20
        yAxis:
            labelPadding: 10
---
xychart-beta
	title "lodash v4.17.21"
	x-axis ["Original",1,2,3,4,5,6,7,8,9,10,11,12,13]
	y-axis "Gzip size" 0 --> 96690
	bar [96690,25240,25862,25979,26187,26200,26498,25152,26655,24686,25503,25022,36327,35944]
Loading
Artifact Original size Gzip size
lodash v4.17.21 (Source) 544.09 kB 96.69 kB
Minifier Minified size Minzipped size Time
1. @swc/core -87% 69.81 kB -74% 25.24 kB 4x 53 ms
2. uglify-js (no compress) -86% 74.61 kB -73% 25.86 kB 28x 333 ms
3. oxc-minify -87% 71.38 kB -73% 25.98 kB 1x 14 ms
4. terser (no compress) -86% 75.04 kB -73% 26.19 kB 33x 393 ms
5. esbuild -87% 72.48 kB -73% 26.20 kB 2x 35 ms
6. @tdewolff/minify -87% 71.90 kB -73% 26.50 kB 🏆 12 ms
7. terser -87% 70.41 kB -74% 25.15 kB 87x 1,028 ms
8. bun -87% 73.45 kB -72% 26.66 kB 1x 23 ms
9. uglify-js 🏆-87% 68.17 kB 🏆-74% 24.69 kB 143x 1,689 ms
10. babel-minify -87% 72.37 kB -74% 25.50 kB 176x 2,083 ms
11. google-closure-compiler -86% 73.50 kB -74% 25.02 kB 352x 4,165 ms
12. tedivm/jshrink -73% 148.78 kB -62% 36.33 kB 31x 371 ms
13. @cminify/cminify-linux-x64 -73% 146.27 kB -63% 35.94 kB 1x 13 ms

---
config:
    xyChart:
        width: 720
        height: 360
        xAxis:
            labelPadding: 20
        yAxis:
            labelPadding: 10
---
xychart-beta
	title "d3 v6.3.1"
	x-axis ["Original",1,2,3,4,5,6,7,8,9,10,11]
	y-axis "Gzip size" 0 --> 130686
	bar [130686,87205,88140,88319,89069,89882,90800,87997,92395,87016,94166,103813]
Loading
Artifact Original size Gzip size
d3 v6.3.1 (Source) 555.77 kB 130.69 kB
Minifier Minified size Minzipped size Time
1. @swc/core -52% 265.22 kB -33% 87.21 kB 5x 144 ms
2. oxc-minify -51% 270.88 kB -33% 88.14 kB 1x 44 ms
3. uglify-js (no compress) -50% 275.35 kB -32% 88.32 kB 25x 711 ms
4. terser (no compress) -50% 276.13 kB -32% 89.07 kB 36x 1,020 ms
5. @tdewolff/minify -52% 269.35 kB -31% 89.88 kB 1x 35 ms
6. esbuild -51% 270.13 kB -31% 90.80 kB 2x 69 ms
7. terser -52% 267.42 kB -33% 88.00 kB 83x 2,338 ms
8. bun -51% 273.41 kB -29% 92.40 kB 1x 47 ms
9. uglify-js 🏆-53% 263.56 kB 🏆-33% 87.02 kB 140x 3,927 ms
10. google-closure-compiler -51% 270.32 kB -28% 94.17 kB 233x 6,553 ms
11. @cminify/cminify-linux-x64 -29% 393.70 kB -21% 103.81 kB 🏆 28 ms
12. babel-minify ❌ Minification -
13. tedivm/jshrink ❌ Minification -

---
config:
    xyChart:
        width: 720
        height: 360
        xAxis:
            labelPadding: 20
        yAxis:
            labelPadding: 10
---
xychart-beta
	title "terser v5.30.3"
	x-axis ["Original",1,2,3,4,5,6,7,8,9,10,11,12]
	y-axis "Gzip size" 0 --> 193763
	bar [193763,122262,123258,124885,124609,124253,126707,127653,123346,123334,126454,145178,144303]
Loading
Artifact Original size Gzip size
terser v5.30.3 (Source) 1.01 MB 193.76 kB
Minifier Minified size Minzipped size Time
1. oxc-minify -56% 440.04 kB 🏆-37% 122.26 kB 1x 45 ms
2. @swc/core -55% 455.52 kB -36% 123.26 kB 5x 130 ms
3. @tdewolff/minify -55% 456.59 kB -36% 124.89 kB 1x 38 ms
4. uglify-js (no compress) -53% 472.16 kB -36% 124.61 kB 33x 778 ms
5. terser (no compress) -53% 472.58 kB -36% 124.25 kB 41x 966 ms
6. esbuild -55% 458.89 kB -35% 126.71 kB 2x 63 ms
7. bun -54% 466.80 kB -34% 127.65 kB 1x 42 ms
8. terser -55% 456.59 kB -36% 123.35 kB 95x 2,227 ms
9. uglify-js -55% 451.19 kB -36% 123.33 kB 162x 3,787 ms
10. google-closure-compiler 🏆-56% 439.97 kB -35% 126.45 kB 255x 5,951 ms
11. tedivm/jshrink -37% 633.71 kB -25% 145.18 kB 57x 1,337 ms
12. @cminify/cminify-linux-x64 -38% 625.93 kB -26% 144.30 kB 🏆 23 ms
13. babel-minify ❌ Minification -

---
config:
    xyChart:
        width: 720
        height: 360
        xAxis:
            labelPadding: 20
        yAxis:
            labelPadding: 10
---
xychart-beta
	title "three v0.124.0"
	x-axis ["Original",1,2,3,4,5,6,7,8,9,10,11,12]
	y-axis "Gzip size" 0 --> 248267
	bar [248267,158751,160827,163723,163036,164610,163181,166210,159165,159071,162771,193471,191965]
Loading
Artifact Original size Gzip size
three v0.124.0 (Source) 1.25 MB 248.27 kB
Minifier Minified size Minzipped size Time
1. @swc/core -48% 643.03 kB 🏆-36% 158.75 kB 8x 204 ms
2. oxc-minify -48% 647.00 kB -35% 160.83 kB 2x 64 ms
3. esbuild -48% 646.76 kB -34% 163.72 kB 3x 95 ms
4. uglify-js (no compress) -46% 674.49 kB -34% 163.04 kB 41x 994 ms
5. @tdewolff/minify -48% 642.46 kB -34% 164.61 kB 2x 53 ms
6. terser (no compress) -46% 675.43 kB -34% 163.18 kB 53x 1,294 ms
7. bun -47% 655.93 kB -33% 166.21 kB 2x 55 ms
8. terser -48% 653.18 kB -36% 159.17 kB 124x 2,985 ms
9. uglify-js 🏆-49% 641.59 kB -36% 159.07 kB 209x 5,046 ms
10. google-closure-compiler -48% 644.52 kB -34% 162.77 kB 314x 7,549 ms
11. tedivm/jshrink -24% 952.01 kB -22% 193.47 kB 71x 1,714 ms
12. @cminify/cminify-linux-x64 -25% 941.06 kB -23% 191.97 kB 🏆 24 ms
13. babel-minify ❌ Timed out - - ⚠️ +10,000 ms

---
config:
    xyChart:
        width: 720
        height: 360
        xAxis:
            labelPadding: 20
        yAxis:
            labelPadding: 10
---
xychart-beta
	title "victory v35.8.4"
	x-axis ["Original",1,2,3,4,5,6,7,8,9,10]
	y-axis "Gzip size" 0 --> 309942
	bar [309942,157754,162349,165014,167579,166176,158459,181071,182671,157435,221118]
Loading
Artifact Original size Gzip size
victory v35.8.4 (Source) 2.13 MB 309.94 kB
Minifier Minified size Minzipped size Time
1. @swc/core -67% 705.99 kB -49% 157.75 kB 8x 307 ms
2. oxc-minify -66% 717.55 kB -48% 162.35 kB 2x 86 ms
3. @tdewolff/minify -66% 717.07 kB -47% 165.01 kB 1x 62 ms
4. uglify-js (no compress) -65% 756.53 kB -46% 167.58 kB 38x 1,314 ms
5. terser (no compress) -65% 756.62 kB -46% 166.18 kB 45x 1,573 ms
6. terser -67% 712.87 kB -49% 158.46 kB 118x 4,042 ms
7. esbuild -66% 724.14 kB -42% 181.07 kB 3x 123 ms
8. bun -66% 727.90 kB -41% 182.67 kB 2x 77 ms
9. uglify-js 🏆-67% 694.78 kB 🏆-49% 157.44 kB 192x 6,579 ms
10. @cminify/cminify-linux-x64 -33% 1.43 MB -29% 221.12 kB 🏆 34 ms
11. google-closure-compiler ❌ Timed out - - ⚠️ +10,000 ms
12. babel-minify ❌ Minification -
13. tedivm/jshrink ❌ Post-validation -

---
config:
    xyChart:
        width: 720
        height: 360
        xAxis:
            labelPadding: 20
        yAxis:
            labelPadding: 10
---
xychart-beta
	title "echarts v5.1.1"
	x-axis ["Original",1,2,3,4,5,6,7,8,9]
	y-axis "Gzip size" 0 --> 684611
	bar [684611,324594,321110,331563,331847,337934,331412,330348,321556,434451]
Loading
Artifact Original size Gzip size
echarts v5.1.1 (Source) 3.20 MB 684.61 kB
Minifier Minified size Minzipped size Time
1. oxc-minify -69% 1.01 MB -53% 324.59 kB 3x 170 ms
2. @swc/core 🏆-69% 994.07 kB 🏆-53% 321.11 kB 13x 623 ms
3. esbuild -68% 1.01 MB -52% 331.56 kB 4x 205 ms
4. @tdewolff/minify -68% 1.01 MB -52% 331.85 kB 2x 126 ms
5. bun -68% 1.02 MB -51% 337.93 kB 2x 126 ms
6. uglify-js (no compress) -67% 1.07 MB -52% 331.41 kB 38x 1,756 ms
7. terser (no compress) -67% 1.07 MB -52% 330.35 kB 58x 2,684 ms
8. terser -69% 998.45 kB -53% 321.56 kB 132x 6,086 ms
9. @cminify/cminify-linux-x64 -45% 1.77 MB -37% 434.45 kB 🏆 46 ms
10. babel-minify ❌ Timed out - - ⚠️ +10,000 ms
11. uglify-js ❌ Timed out - - ⚠️ +10,000 ms
12. google-closure-compiler ❌ Timed out - - ⚠️ +10,000 ms
13. tedivm/jshrink ❌ Minification -

---
config:
    xyChart:
        width: 720
        height: 360
        xAxis:
            labelPadding: 20
        yAxis:
            labelPadding: 10
---
xychart-beta
	title "antd v4.16.1"
	x-axis ["Original",1,2,3,4,5,6,7,8,9,10]
	y-axis "Gzip size" 0 --> 825175
	bar [825175,460597,452400,471791,488279,491833,478572,474973,457352,623370,626675]
Loading
Artifact Original size Gzip size
antd v4.16.1 (Source) 6.67 MB 825.18 kB
Minifier Minified size Minzipped size Time
1. oxc-minify -66% 2.25 MB -44% 460.60 kB 3x 249 ms
2. @swc/core 🏆-68% 2.15 MB 🏆-45% 452.40 kB 10x 801 ms
3. @tdewolff/minify -66% 2.29 MB -43% 471.79 kB 1x 146 ms
4. esbuild -65% 2.31 MB -41% 488.28 kB 4x 312 ms
5. bun -66% 2.30 MB -40% 491.83 kB 2x 171 ms
6. uglify-js (no compress) -64% 2.42 MB -42% 478.57 kB 34x 2,525 ms
7. terser (no compress) -64% 2.42 MB -42% 474.97 kB 42x 3,144 ms
8. terser -66% 2.24 MB -45% 457.35 kB 97x 7,180 ms
9. @cminify/cminify-linux-x64 -34% 4.43 MB -24% 623.37 kB 🏆 74 ms
10. tedivm/jshrink -33% 4.45 MB -24% 626.68 kB 98x 7,276 ms
11. babel-minify ❌ Timed out - - ⚠️ +10,000 ms
12. uglify-js ❌ Timed out - - ⚠️ +10,000 ms
13. google-closure-compiler ❌ Timed out - - ⚠️ +10,000 ms

---
config:
    xyChart:
        width: 720
        height: 360
        xAxis:
            labelPadding: 20
        yAxis:
            labelPadding: 10
---
xychart-beta
	title "typescript v4.9.5"
	x-axis ["Original",1,2,3,4,5,6,7]
	y-axis "Gzip size" 0 --> 1884998
	bar [1884998,860693,875817,859044,915551,876535,878642,1128072]
Loading
Artifact Original size Gzip size
typescript v4.9.5 (Source) 10.95 MB 1.88 MB
Minifier Minified size Minzipped size Time
1. oxc-minify -69% 3.35 MB -54% 860.69 kB 4x 482 ms
2. @tdewolff/minify -69% 3.35 MB -54% 875.82 kB 2x 266 ms
3. @swc/core 🏆-70% 3.31 MB 🏆-54% 859.04 kB 15x 1,701 ms
4. esbuild -68% 3.49 MB -51% 915.55 kB 4x 519 ms
5. uglify-js (no compress) -68% 3.54 MB -53% 876.54 kB 36x 4,029 ms
6. terser (no compress) -68% 3.53 MB -53% 878.64 kB 47x 5,316 ms
7. @cminify/cminify-linux-x64 -47% 5.85 MB -40% 1.13 MB 🏆 111 ms
8. terser ❌ Timed out - - ⚠️ +10,000 ms
9. babel-minify ❌ Timed out - - ⚠️ +10,000 ms
10. uglify-js ❌ Timed out - - ⚠️ +10,000 ms
11. tedivm/jshrink ❌ Timed out - - ⚠️ +10,000 ms
12. google-closure-compiler ❌ Timed out - - ⚠️ +10,000 ms
13. bun ❌ Post-validation -

⚔️ Minifier showdown

Note

🤖 This analysis is AI generated. See below for the system prompt.

If JavaScript minification were a gladiator arena, this year’s contenders wouldn’t just be fighting for survival—they’d be battling for glory in the arenas of size-saving and speed domination. The challengers range from seasoned veterans like UglifyJS to swift newcomers like @cminify. And while some soared to greatness, others stumbled in their attempts. Let the breakdown commence.

Best Minifier

@swc/core was the unquestionable champion, delivering a peerless performance across both compression and speed categories. It didn’t just show up—it dominated the rounds with big files like "three," "echarts," and "antd," where size mattered most. Managing to chop over half off a giant like "typescript" (clocking in at nearly 1.9 MB) while holding its own at a respectable 1.7 seconds? That’s the stuff of legends. For rounds where @swc/core didn’t outright win, it consistently snagged the "Most Balanced" title—proving itself a versatile tool that’s both practical and powerful. If your workflow craves a mix of precision and reasonable speed, this is your claymore.

Honorable Mentions

Let’s tip our hats to the fleet-footed @tdewolff/minify, a minification speedster that could dash circles around the competition. Saving developers minutes—not just seconds—it shredded libraries like "react" into pixelated confetti in mere milliseconds. While its compression ratios lagged slightly behind the titans, its lightning-fast results make it ideal for day-to-day tasks in continuous deployment pipelines.

Oxc-minify may be a freshman in this fight, but its balance of efficiency and compression brought fresh energy to the rounds, particularly for artifacts scaled like "terser" or "antd." It trades just a sliver of gzip size for the kind of speed performance that ensures smooth workflows on hefty modules. Though not quite as consistent as @swc/core, Oxc proved itself a reliable contender—quietly pushing through multilayers of JavaScript with precision.

The elder titan UglifyJS also deserves a nod here. While speed is not its forte (it turned "victory" into an all-out marathon, clocking over six seconds!), it flexed unmatched compression muscles time and time again. If you can tolerate the longer processing time, using UglifyJS for maximized size reductions on critical assets would still be worth it. The art of shaving kilobytes to their bare bones? This veteran wrote the book.

Finally, give it up for @cminify, the speed champion when tackling behemoths like "antd" and "three." True, it routinely sacrificed compression for efficiency, but if time is flat out non-negotiable—say, for blazing-fast development cycles—@cminify’s insane throughput of 1 MB files in just over 100 ms will be the stuff of envy for CI engineers everywhere.

Eliminated

Not everyone survived this colosseum of benchmarks. The following contenders were cut from the race due to fatal flaws:

  • babel-minify suffered a tactical misstep, crashing disastrously on "d3" with a cryptic "Cannot read properties of undefined" error. The emperor (i.e., benchmark fairness) ruled: thumbs down.

  • tedivm/jshrink had an honorable intent but faltered under regex-heavy code in "d3," falling to an "Unclosed pattern" runtime exception. A tragic end, yet predictable for regex-centric tools battling modern JavaScript complexity.

  • bun, riding high on hype as a speedy newcomer, lost its footing in "typescript," with post-validation errors related to inconsistent line endings. A painful technical stumble that rendered its output invalid.

Closing Remarks

This year’s showdown highlighted that JavaScript minification is no longer just a battle for size—it’s also a fight for timely execution. From @swc/core’s dominance to @tdewolff/minify’s turbo-charged runs, each tool brought unique strengths to the table. And while eliminations were harsh, the remaining players demonstrated remarkable resilience and versatility.

For developers deciding their champion, the question isn’t merely "Who compresses best?"—it’s "Who fits your workflow?" Whether you prioritize speed, file size, or a practical equilibrium, the finalists here give you plenty of options to explore.

System prompt

Today's date is 2025-08-07

You are a JavaScript minification benchmark analyst with a flair for storytelling.

## Objective
Analyze JavaScript minifiers based strictly on benchmark data: *minified Gzip size* and *minification speed*.
Present your findings as an entertaining and intuitive commentary, helping readers understand performance trade-offs even if they aren't familiar with kilobytes, milliseconds, or compression ratios.
Your job is to narrate the race—not just display the scoreboard.

## Rules of Engagement
1. **Compare only what's measured**: Evaluate each minifier based solely on Gzip size and speed. Avoid assumptions about correctness, compatibility, or code quality unless failures are explicitly shown in the results.
2. **Crown the winner**:
   - Prioritize smallest Gzip size (transfer time matters most).
   - Consider speed—especially where compression is close. A 10× faster tool with ~1% worse compression might be more practical for CI pipelines.
   - Bigger source = harder challenge. Reward outstanding performance on large artifacts.
   - Trade-offs are key. Highlight where a tool sacrifices speed for size (or vice versa), and who manages both impressively.
3. **Context matters**:
   - These benchmarks only capture performance. Real-world adoption also depends on DX: install size, API design, community, etc. Mention that—briefly—but do not evaluate it.
   - If a tool stands out only in niche scenarios, note it.
   - If a tool fails validation or breaks input code, eliminate it and warn accordingly.

## Output format
- **Tone**: Energetic, cheeky, and dramatic—like a live commentator at a niche sporting event. No emojis.
- **Style**: Short, connected sentences. Prioritize flow over bullet lists, except for eliminations.
- **Audience**: Readers who want *practical insight* from raw benchmark data—without needing to decode gzip math or performance charts.

## Output structure
```md
<Quick intro — set the tone. Comment on how fierce or surprising the field was.>

### Best minifier
<Name the top performer and justify it. Consider consistency, trade-offs, and standout moments. Call out how hard the decision was if close.>

### Honorable mentions
<Concisely highlight specific tools that impressed in size, speed, or balance. Mention exciting newcomers or quietly consistent performers.>

### Eliminated
<List of disqualified minifiers, each with a quick reason (e.g., crash, invalid output, critical bug). Be clear but diplomatic.>

<Closing remarks — Concisely celebrate the competition, acknowledge that DX and correctness also matter, and encourage readers to explore what fits their workflow.>
```


# Minifiers
- babel-minify v0.5.2 released 2022-05-06
- bun v1.2.19 released 2025-07-19
- @cminify/cminify-linux-x64 v3.0.1 released 2025-07-27
- esbuild v0.25.8 released 2025-07-19
- google-closure-compiler v20250805.0.0 released 2025-08-07
- tedivm/jshrink v1.8.0
- oxc-minify v0.81.0 released 2025-08-06
- @swc/core v1.13.3 released 2025-07-29
- @tdewolff/minify v2.23.11 released 2025-08-06
- terser v5.43.1 released 2025-06-19
- uglify-js v3.19.3 released 2024-08-29

# Race results
## Round 1: npm package "react" (19.39 kB gzipped)
- Best gzip compression: uglify-js: 8.18 kB (58% shaved) in 497 ms
- Fastest: @tdewolff/minify: 8.63 kB (55% shaved) in 3 ms
- Most balanced: @swc/core: 8.19 kB (58% shaved) in 12 ms
- Honorable mention: terser: 8.26 kB (57% shaved) in 275 ms

## Round 2: npm package "moment" (36.23 kB gzipped)
- Best gzip compression: uglify-js: 18.57 kB (49% shaved) in 1,149 ms
- Fastest: @tdewolff/minify: 19.48 kB (46% shaved) in 5 ms
- Most balanced: @swc/core: 18.75 kB (48% shaved) in 30 ms
- Honorable mention: oxc-minify: 19.26 kB (47% shaved) in 9 ms

## Round 3: npm package "jquery" (84.50 kB gzipped)
- Best gzip compression: terser: 30.86 kB (63% shaved) in 921 ms
- Fastest: @tdewolff/minify: 31.45 kB (63% shaved) in 9 ms
- Most balanced: @swc/core: 30.87 kB (63% shaved) in 47 ms
- Honorable mention: oxc-minify: 30.97 kB (63% shaved) in 15 ms

## Round 4: npm package "vue" (89.67 kB gzipped)
- Best gzip compression: @swc/core: 42.73 kB (52% shaved) in 65 ms
- Fastest: @tdewolff/minify: 44.36 kB (51% shaved) in 13 ms
- Most balanced: @swc/core: 42.73 kB (52% shaved) in 65 ms
- Honorable mention: oxc-minify: 43.35 kB (52% shaved) in 18 ms

## Round 5: npm package "lodash" (96.69 kB gzipped)
- Best gzip compression: uglify-js: 24.69 kB (74% shaved) in 1,689 ms
- Fastest: @tdewolff/minify: 26.50 kB (73% shaved) in 12 ms
- Most balanced: @swc/core: 25.24 kB (74% shaved) in 53 ms
- Honorable mention: uglify-js (no compress): 25.86 kB (73% shaved) in 333 ms

## Round 6: npm package "d3" (130.69 kB gzipped)
- Best gzip compression: uglify-js: 87.02 kB (33% shaved) in 3,927 ms
- Fastest: @cminify/cminify-linux-x64: 103.81 kB (21% shaved) in 28 ms
- Most balanced: @swc/core: 87.21 kB (33% shaved) in 144 ms
- Honorable mention: oxc-minify: 88.14 kB (33% shaved) in 44 ms

## Round 7: npm package "terser" (193.76 kB gzipped)
- Best gzip compression: oxc-minify: 122.26 kB (37% shaved) in 45 ms
- Fastest: @cminify/cminify-linux-x64: 144.30 kB (26% shaved) in 23 ms
- Most balanced: oxc-minify: 122.26 kB (37% shaved) in 45 ms
- Honorable mention: @swc/core: 123.26 kB (36% shaved) in 130 ms

## Round 8: npm package "three" (248.27 kB gzipped)
- Best gzip compression: @swc/core: 158.75 kB (36% shaved) in 204 ms
- Fastest: @cminify/cminify-linux-x64: 191.97 kB (23% shaved) in 24 ms
- Most balanced: @swc/core: 158.75 kB (36% shaved) in 204 ms
- Honorable mention: oxc-minify: 160.83 kB (35% shaved) in 64 ms

## Round 9: npm package "victory" (309.94 kB gzipped)
- Best gzip compression: uglify-js: 157.44 kB (49% shaved) in 6,579 ms
- Fastest: @cminify/cminify-linux-x64: 221.12 kB (29% shaved) in 34 ms
- Most balanced: @swc/core: 157.75 kB (49% shaved) in 307 ms
- Honorable mention: oxc-minify: 162.35 kB (48% shaved) in 86 ms

## Round 10: npm package "echarts" (684.61 kB gzipped)
- Best gzip compression: @swc/core: 321.11 kB (53% shaved) in 623 ms
- Fastest: @cminify/cminify-linux-x64: 434.45 kB (37% shaved) in 46 ms
- Most balanced: oxc-minify: 324.59 kB (53% shaved) in 170 ms
- Honorable mention: esbuild: 331.56 kB (52% shaved) in 205 ms

## Round 11: npm package "antd" (825.18 kB gzipped)
- Best gzip compression: @swc/core: 452.40 kB (45% shaved) in 801 ms
- Fastest: @cminify/cminify-linux-x64: 623.37 kB (24% shaved) in 74 ms
- Most balanced: oxc-minify: 460.60 kB (44% shaved) in 249 ms
- Honorable mention: @tdewolff/minify: 471.79 kB (43% shaved) in 146 ms

## Round 12: npm package "typescript" (1.88 MB gzipped)
- Best gzip compression: @swc/core: 859.04 kB (54% shaved) in 1,701 ms
- Fastest: @cminify/cminify-linux-x64: 1.13 MB (40% shaved) in 111 ms
- Most balanced: oxc-minify: 860.69 kB (54% shaved) in 482 ms
- Honorable mention: @tdewolff/minify: 875.82 kB (54% shaved) in 266 ms

# Eliminated
## babel-minify
Failed "d3" in minification stage:
"unknown: Cannot read properties of undefined (reading 'add')"

## tedivm/jshrink
Failed "d3" in minification stage:
"RuntimeException: Unclosed regex pattern at position: 289075 in /packages/minifiers/vendor/tedivm/jshrink/src/JShrink/Minifier.php:660"

## bun
Failed "typescript" in post-validation stage:
"Expected values to be strictly equal:\n+ actual - expected\n\n+ 'var x = function () { return \"string\"; };\\r\\n'\n- 'var x = function () { return \"string\"; };\\n'"

Sponsors

About

🏃‍♂️🏃‍♀️🏃 JS minification benchmarks: babel-minify, esbuild, terser, uglify-js, swc, google closure compiler, tdewolff/minify, oxc-minify

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Sponsor this project