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 ↓
oxc-minify 0.82.2 2025-08-17
google-closure-compiler 20250813.0.0 2025-08-15
esbuild 0.25.9 2025-08-12
bun 1.2.20 2025-08-10
@tdewolff/minify 2.23.11 2025-08-06
@swc/core 1.13.3 2025-07-29
@cminify/cminify-linux-x64 3.0.1 2025-07-27
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 18, 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

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 -68% 23.41 KB -56% 8.47 KB 1x 3 ms
5. esbuild -67% 23.70 KB -56% 8.54 KB 5x 15 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. babel-minify -67% 23.60 KB -56% 8.45 KB 256x 647 ms
10. bun -67% 23.99 KB -55% 8.66 KB 5x 13 ms
11. google-closure-compiler -68% 22.84 KB -58% 8.22 KB 1396x 3,520 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

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.48 KB -47% 19.26 KB 1x 8 ms
3. esbuild -66% 59.82 KB -47% 19.33 KB 3x 20 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 668x 3,658 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

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 14 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.96 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 27 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 478x 4,141 ms
13. @cminify/cminify-linux-x64 -51% 141.45 KB -52% 40.37 KB 2x 22 ms

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 17 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 41 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 30 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 351x 4,536 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

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 13 ms
4. terser (no compress) -86% 75.04 KB -73% 26.19 KB 33x 393 ms
5. esbuild -87% 72.50 KB -73% 26.20 KB 2x 34 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 22 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 366x 4,329 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

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.86 KB -33% 88.13 KB 1x 39 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.21 KB -31% 90.81 KB 2x 68 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 46 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 239x 6,705 ms
11. @cminify/cminify-linux-x64 -29% 393.70 KB -21% 103.81 KB 🏆 28 ms
12. babel-minify ❌ Minification -
13. tedivm/jshrink ❌ Minification -

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 41 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.93 KB -35% 126.71 KB 2x 62 ms
7. terser -55% 456.59 KB -36% 123.35 KB 95x 2,227 ms
8. bun -54% 466.80 KB -34% 127.65 KB 1x 41 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 269x 6,283 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 -

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% 646.98 KB -35% 160.82 KB 2x 57 ms
3. uglify-js (no compress) -46% 674.49 KB -34% 163.04 KB 41x 994 ms
4. esbuild -48% 646.93 KB -34% 163.75 KB 3x 88 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 53 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 328x 7,905 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

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% 715.37 KB -48% 162.13 KB 2x 80 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% 725.65 KB -42% 181.23 KB 3x 122 ms
8. bun -66% 727.90 KB -41% 182.67 KB 2x 73 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 -

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.48 KB 3x 156 ms
2. @swc/core 🏆-69% 994.07 KB 🏆-53% 321.11 KB 13x 623 ms
3. esbuild -68% 1.01 MB -52% 331.62 KB 4x 188 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 118 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 -

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 -67% 2.23 MB -44% 459.17 KB 3x 229 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.42 KB 4x 300 ms
5. bun -66% 2.30 MB -40% 491.83 KB 2x 163 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

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.33 KB 3x 431 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.59 KB 4x 491 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.

The battle of the JavaScript minifiers has concluded, and what a thrilling competition it was! Each contender brought their unique flavor to the arena: some raced like greased lightning, while others meticulously shaved off every last byte. Breaking ties between speed demons and byte-hunters wasn’t easy, but the results are in. Let’s crown the champions.

Best minifier

@swc/core takes the gold this year. Across twelve grueling rounds spanning everything from small React libraries to the monolithic TypeScript package, @swc/core achieved an exceptional balance of small sizes and blazing speed. It didn’t just win with consistent performance—it dominated with its adaptability. Whether carving down moment.js or taming antd's bulky 825 KB package, @swc/core defended its title as the jack-of-all-trades, often matching the smallest gzip size or running closer to the fastest contenders than you'd think for such impressive compression.

Its crowning moment? The "echarts" challenge, where it shrank 684.61 KB down to an impressive 321.11 KB with 53% saved, sealing its win in just 623 milliseconds. Sure, it’s not the flashiest in raw speed, but when milliseconds are paired with byte-busting perfection, you’ve got a Minifier Supreme.

Honorable mentions

Several challengers made us applaud, gasp, and occasionally rethink what "best" really means.

  • Uglify-js: The compression wizard. It repeatedly claimed the smallest gzip sizes, like slashing lodash's hefty 96.69 KB into an astonishing 24.69 KB. But speed, oh dear. At 6,579 milliseconds for "victory," you could binge a sitcom episode before it finished. Elite for scenarios where size takes absolute precedence—just pack some patience.

  • @tdewolff/minify: The speed demon. Who knew you could process React in 3 milliseconds? This minifier blazed through the benchmarks like a caffeinated marathon runner, always finishing first. The catch? It saved fewer bytes, making it ideal for CI pipelines where seconds matter more than kilobytes.

  • Oxc-minify: The dark horse. This newcomer showed up late to the party but dazzled with an uncanny mix of balance and speed. It was often within striking distance of @swc/core’s compression but significantly faster, like in "typescript," where it saved 54% in 431 milliseconds. A future challenger to watch closely.

  • @cminify/cminify-linux-x64: A rocket on rails. This minifier was the fastest on larger artifacts like "antd" and "three." But alas, it minced bytes less aggressively, leaving substantial savings behind in pursuit of speed. Still, it's perfect for massive bundles where a quick win is preferable to exhaustive fine-tuning.

  • Terser: A crowd favorite that sparkled in rounds like "jquery," with its 30.86 KB gzip size leading the field. Terser’s charm lies in its reliable compression and stable performance. It didn’t dominate across the board, but it stayed in the fight, earning an honorable nod.

Eliminated

Let’s pay final respects to the minifiers who stumbled, proving once again that reliability is just as important as performance.

  1. babel-minify: Collapsed on "d3" with a cryptic error about undefined properties. The minifier withered under the pressure of larger libraries.

  2. tedivm/jshrink: Failed spectacularly on "d3," thanks to an "Unclosed regex pattern." Regex goblins are nobody’s friend.

  3. bun: A promising new arrival sadly disqualified at the post-validation stage for "typescript." Parsing quirks and newline mismatches cost it victory this time. Perhaps next season it will return stronger.

Closing remarks

The minification games remind us that every tool has its unique strengths, whether you’re chasing the smallest possible package or the speediest solution for massive CI pipelines. While @swc/core emerged as the most balanced powerhouse, Uglify-js remains indispensable for byte-pinching, and @tdewolff/minify is unbeatable when speed calls the shots.

Ultimately, your perfect minifier depends on your needs. If you prioritize transfer size for latency-sensitive applications, give Uglify-js or @swc/core a spin. Rushing to deploy libraries at breakneck speed? Keep @tdewolff/minify in your corner. And for those intrigued by a rising star, Oxc-minify is an exciting contender ready to shake things up.

The minification arena never rests—new contenders await, and all eyes are on next year’s race.

System prompt

Today's date is 2025-08-18

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.20 released 2025-08-10
- @cminify/cminify-linux-x64 v3.0.1 released 2025-07-27
- esbuild v0.25.9 released 2025-08-12
- google-closure-compiler v20250813.0.0 released 2025-08-15
- tedivm/jshrink v1.8.0
- oxc-minify v0.82.2 released 2025-08-17
- @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 8 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 14 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 17 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.13 KB (33% shaved) in 39 ms

## Round 7: npm package "terser" (193.76 KB gzipped)
- Best gzip compression: oxc-minify: 122.26 KB (37% shaved) in 41 ms
- Fastest: @cminify/cminify-linux-x64: 144.30 KB (26% shaved) in 23 ms
- Most balanced: oxc-minify: 122.26 KB (37% shaved) in 41 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.82 KB (35% shaved) in 57 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.13 KB (48% shaved) in 80 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.48 KB (53% shaved) in 156 ms
- Honorable mention: esbuild: 331.62 KB (52% shaved) in 188 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: 459.17 KB (44% shaved) in 229 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.33 KB (54% shaved) in 431 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

 

Contributors 10