Skip to content

j9t/minifier-benchmarks

Repository files navigation

Minifier Benchmarks

A collection of regularly updated benchmarks for HTML+ minifiers (context).

Two tests are run: One exclusively applying HTML minification (with the most aggressive settings that do not impact conformance), the other enabling all minification features the respective minifier offers (this is play—it’s not a fair comparison and may exceed project needs).

0. Minifier Overview

@swc/html HTML Minifier Next html­com­pressor.­com htmlnano minify-html minimize
Last npm update npm @swc/html npm HTML Minifier Next n/a npm htmlnano npm minify-html npm minimize
Socket health status Socket @swc/html Socket HTML Minifier Next n/a Socket htmlnano Socket minify-html Socket minimize
GitHub sponsors Sponsors @swc/html Sponsors HTML Minifier Next n/a n/a n/a n/a

1. HTML Minification Compared

Site Original Size (KB) @swc/html HTML Minifier Next html­com­pressor.­com htmlnano minify-html minimize
Minifier Test 31 26
(–17.2%)
25
(–19.6%)
26
(–17%)
26
(–16.5%)
25
(–19.2%)
26
(–16.3%)
A List Apart 63 60
(–5.7%)
58
(–8.3%)
59
(–7.2%)
58
(–7.6%)
58
(–8.3%)
59
(–7.2%)
Apple 253 240
(–5%)
234
(–7.6%)
239
(–5.7%)
237
(–6.2%)
236
(–6.8%)
238
(–5.9%)
BBC 704 700
(–0.7%)
694
(–1.5%)
n/a 698
(–1%)
694
(–1.4%)
698
(–0.9%)
Bun 461 451
(–2.2%)
441
(–4.2%)
n/a 454
(–1.5%)
452
(–2%)
455
(–1.3%)
CERN 286 274
(–3.9%)
267
(–6.7%)
274
(–4.2%)
273
(–4.3%)
272
(–4.7%)
274
(–4.2%)
CSS-Tricks 166 154
(–7.2%)
152
(–8.8%)
153
(–8.1%)
152
(–8.5%)
152
(–8.7%)
153
(–8.1%)
DeepSeek 105 104
(–0.7%)
98
(–7.1%)
104
(–1.1%)
104
(–1.4%)
104
(–1.2%)
104
(–1.1%)
DIN 253 182
(–28.2%)
175
(–30.6%)
183
(–27.7%)
182
(–28%)
179
(–29%)
182
(–27.8%)
DLR 541 538
(–0.6%)
535
(–1%)
n/a 537
(–0.8%)
536
(–1%)
538
(–0.5%)
ECMAScript 7236 6879
(–4.9%)
6645
(–8.2%)
n/a 6757
(–6.6%)
6779
(–6.3%)
6809
(–5.9%)
EDRi 84 77
(–7.6%)
77
(–8.2%)
78
(–6.6%)
77
(–7.5%)
77
(–8.1%)
78
(–6.7%)
EFF 54 49
(–8%)
47
(–12.9%)
50
(–7.8%)
48
(–10%)
48
(–11.6%)
49
(–9.7%)
European Alternatives 49 33
(–33.1%)
33
(–33.9%)
33
(–32.9%)
33
(–33.1%)
33
(–33.7%)
33
(–33.1%)
FAZ 1487 1440
(–3.2%)
1367
(–8.1%)
n/a 1438
(–3.3%)
1432
(–3.7%)
1435
(–3.5%)
French Tech 167 136
(–18.6%)
135
(–19.2%)
136
(–18.3%)
136
(–18.5%)
135
(–19.1%)
136
(–18.4%)
Front-End Social 36 34
(–3.7%)
34
(–5.6%)
35
(–3.1%)
34
(–5.5%)
34
(–5.6%)
35
(–3.1%)
Frontend Dogma 223 231
(+3.6%)
223
(0%)
223
(–0.2%)
236
(+5.9%)
223
(0%)
242
(+8.3%)
Google 79 122
(+54.7%)
78
(–0.6%)
79
(–0.3%)
78
(–0.8%)
78
(–0.6%)
79
(–0.3%)
Ground News 2099 2076
(–1.1%)
2037
(–3%)
n/a 2082
(–0.8%)
2074
(–1.2%)
2085
(–0.7%)
HTML 3.2 123 119
(–3%)
119
(–3%)
121
(–1.2%)
124
(+0.9%)
119
(–3.2%)
123
(+0.5%)
HTML Living Standard 151 154
(+1.8%)
150
(–0.6%)
151
(–0.2%)
155
(+2.6%)
151
(–0.3%)
157
(+3.8%)
IETF 83 34
(–58.6%)
32
(–61.2%)
35
(–58.1%)
34
(–59.2%)
34
(–59.7%)
34
(–58.6%)
Igalia 43 34
(–21.6%)
31
(–27.5%)
33
(–22.7%)
33
(–23.1%)
33
(–23.7%)
33
(–23.1%)
Ladybird 30 29
(–3.9%)
28
(–6.5%)
28
(–5%)
28
(–5.5%)
28
(–5.7%)
28
(–5.1%)
Leanpub 290 287
(–1.1%)
281
(–3.2%)
287
(–1%)
287
(–1.3%)
285
(–1.9%)
285
(–1.8%)
Legge Stanca 17 12
(–28.5%)
12
(–30.4%)
12
(–27.3%)
12
(–29.7%)
12
(–30.2%)
12
(–27.5%)
Mastodon 31 30
(–3.2%)
29
(–4.7%)
30
(–2.7%)
29
(–4.6%)
29
(–4.6%)
30
(–2.8%)
MDN 117 71
(–39.3%)
68
(–41.9%)
73
(–37.9%)
72
(–38.1%)
69
(–40.6%)
72
(–38.3%)
Mistral AI 348 333
(–4.3%)
329
(–5.7%)
n/a 345
(–0.9%)
336
(–3.7%)
345
(–0.9%)
Mondoweiss 460 450
(–2%)
431
(–6.2%)
n/a 439
(–4.6%)
437
(–4.9%)
440
(–4.3%)
Mozilla 47 37
(–21.1%)
35
(–25.9%)
37
(–22.3%)
36
(–23.9%)
35
(–26.1%)
36
(–23.1%)
Nielsen Norman Group 100 84
(–16.3%)
83
(–17.3%)
84
(–16%)
84
(–15.5%)
83
(–17%)
84
(–15.6%)
Opera 184 132
(–28.1%)
129
(–29.9%)
132
(–28.3%)
131
(–28.6%)
131
(–28.9%)
131
(–28.7%)
OSCE 177 149
(–15.8%)
146
(–17.1%)
149
(–15.8%)
149
(–15.6%)
146
(–17.1%)
149
(–15.6%)
Scrum Guide 34 31
(–8.9%)
30
(–10.7%)
32
(–7.3%)
31
(–7.9%)
31
(–10.1%)
31
(–7.8%)
SELFHTML 21 19
(–7.6%)
17
(–17.4%)
18
(–13.6%)
18
(–14.4%)
17
(–16.8%)
18
(–14.2%)
SitePoint 262 259
(–1.3%)
258
(–1.5%)
260
(–0.7%)
260
(–0.9%)
259
(–1.1%)
260
(–0.7%)
Smashing Magazine 285 286
(+0.2%)
284
(–0.6%)
285
(–0.1%)
285
(–0.2%)
284
(–0.4%)
285
(+0%)
Startup-Verband 45 33
(–26.3%)
32
(–29.3%)
33
(–26.8%)
33
(–27.2%)
33
(–28.2%)
33
(–26.5%)
TAZ 451 426
(–5.6%)
405
(–10.3%)
n/a 417
(–7.6%)
416
(–7.9%)
419
(–7.2%)
TetraLogical 60 54
(–10%)
54
(–10.4%)
55
(–9.7%)
55
(–9.7%)
54
(–10.2%)
55
(–9.7%)
TPGi 180 166
(–8.2%)
163
(–9.7%)
166
(–8.3%)
164
(–9.2%)
163
(–9.4%)
165
(–8.3%)
United Nations 152 132
(–13.6%)
127
(–16.7%)
132
(–13.7%)
130
(–14.5%)
129
(–15.2%)
131
(–13.9%)
UX Collective 98 141
(+43.2%)
96
(–2.5%)
98
(–0.7%)
97
(–1.1%)
97
(–1.4%)
97
(–0.9%)
Vivaldi 93 85
(–8.5%)
84
(–10.4%)
85
(–9.2%)
84
(–9.5%)
84
(–10.5%)
85
(–9.1%)
W3C 51 41
(–18.7%)
40
(–20.8%)
41
(–19.1%)
41
(–19.4%)
40
(–20.3%)
41
(–19%)
WordPress Blog 207 191
(–7.4%)
188
(–9%)
193
(–6.8%)
191
(–7.4%)
190
(–8.3%)
193
(–6.6%)
Sites processed (of sites overall) 48/48 48/48 39/48 48/48 48/48 48/48
Average processing time 31 ms 40 ms 782 ms 37 ms 9 ms 188 ms
Average result (KB) 386 367
(–4.8%)
355
(–8%)
376
(–2.7%)
363
(–6%)
361
(–6.3%)
364
(–5.6%)

2. Maximum Minification Compared

Site Original Size (KB) @swc/html HTML Minifier Next html­com­pressor.­com htmlnano minify-html minimize
Minifier Test 31 24
(–23.3%)
23
(–25.5%)
24
(–22.9%)
23
(–26.5%)
23
(–25.3%)
26
(–16.3%)
A List Apart 63 57
(–9.1%)
54
(–14.7%)
57
(–9.9%)
40
(–37.1%)
56
(–11.7%)
59
(–7.2%)
Apple 253 240
(–5.3%)
224
(–11.6%)
238
(–5.9%)
228
(–9.8%)
236
(–6.9%)
238
(–5.9%)
BBC 704 662
(–6%)
647
(–8.1%)
n/a 657
(–6.7%)
657
(–6.8%)
698
(–0.9%)
Bun 461 435
(–5.7%)
420
(–8.8%)
n/a 374
(–18.9%)
436
(–5.3%)
455
(–1.3%)
CERN 286 259
(–9.2%)
245
(–14.2%)
264
(–7.7%)
207
(–27.5%)
258
(–9.7%)
274
(–4.2%)
CSS-Tricks 166 145
(–13.1%)
133
(–20.1%)
146
(–12.3%)
112
(–32.8%)
144
(–13.4%)
153
(–8.1%)
DeepSeek 105 100
(–5.1%)
84
(–19.9%)
100
(–5.1%)
90
(–14.4%)
99
(–5.4%)
104
(–1.1%)
DIN 253 175
(–30.8%)
163
(–35.3%)
176
(–30.5%)
136
(–46.4%)
174
(–31.2%)
182
(–27.8%)
DLR 541 508
(–6%)
499
(–7.8%)
n/a 494
(–8.7%)
501
(–7.4%)
538
(–0.5%)
ECMAScript 7236 6879
(–4.9%)
6644
(–8.2%)
n/a 6756
(–6.6%)
6779
(–6.3%)
6809
(–5.9%)
EDRi 84 74
(–11.1%)
70
(–15.9%)
76
(–9.5%)
55
(–34.7%)
74
(–11.3%)
78
(–6.7%)
EFF 54 48
(–10.9%)
44
(–18.9%)
48
(–10.1%)
46
(–14.2%)
47
(–12.5%)
49
(–9.7%)
European Alternatives 49 33
(–33.2%)
31
(–37.7%)
33
(–33%)
31
(–36.9%)
33
(–33.8%)
33
(–33.1%)
FAZ 1487 1373
(–7.6%)
1315
(–11.6%)
n/a 1242
(–16.5%)
1424
(–4.2%)
1435
(–3.5%)
French Tech 167 130
(–22.4%)
125
(–25.3%)
131
(–21.9%)
55
(–67.4%)
129
(–22.9%)
136
(–18.4%)
Front-End Social 36 34
(–3.7%)
31
(–13.9%)
35
(–3.1%)
31
(–13.8%)
34
(–5.6%)
35
(–3.1%)
Frontend Dogma 223 231
(+3.6%)
216
(–3.3%)
223
(–0.2%)
228
(+2.1%)
223
(0%)
242
(+8.3%)
Google 79 75
(–4.7%)
75
(–5.4%)
78
(–0.8%)
63
(–19.8%)
76
(–3.6%)
79
(–0.3%)
Ground News 2099 1964
(–6.4%)
1890
(–10%)
n/a 1937
(–7.7%)
1961
(–6.6%)
2085
(–0.7%)
HTML 3.2 123 119
(–3.1%)
118
(–3.4%)
121
(–1.3%)
123
(+0.7%)
119
(–3.3%)
123
(+0.5%)
HTML Living Standard 151 154
(+1.8%)
150
(–0.7%)
151
(–0.3%)
155
(+2.5%)
151
(–0.3%)
157
(+3.8%)
IETF 83 34
(–58.9%)
32
(–61.9%)
35
(–58.3%)
33
(–60%)
33
(–59.9%)
34
(–58.6%)
Igalia 43 33
(–23.1%)
30
(–29.9%)
33
(–23.7%)
32
(–25.9%)
32
(–25.3%)
33
(–23.1%)
Ladybird 30 29
(–4%)
28
(–7.7%)
28
(–5.1%)
26
(–14.1%)
28
(–5.8%)
28
(–5.1%)
Leanpub 290 276
(–4.9%)
261
(–10.1%)
287
(–1.1%)
267
(–8.1%)
273
(–5.8%)
285
(–1.8%)
Legge Stanca 17 10
(–43.8%)
9
(–46.5%)
10
(–42.7%)
9
(–46.5%)
10
(–40.5%)
12
(–27.5%)
Mastodon 31 29
(–4.7%)
26
(–15.6%)
30
(–3.1%)
26
(–15.5%)
29
(–5.1%)
30
(–2.8%)
MDN 117 71
(–39.4%)
67
(–43%)
72
(–38%)
55
(–53%)
69
(–40.6%)
72
(–38.3%)
Mistral AI 348 333
(–4.4%)
253
(–27.5%)
n/a 258
(–26%)
335
(–3.8%)
345
(–0.9%)
Mondoweiss 460 432
(–5.9%)
412
(–10.4%)
n/a 407
(–11.5%)
426
(–7.3%)
440
(–4.3%)
Mozilla 47 37
(–21.1%)
32
(–31.7%)
37
(–22.3%)
33
(–29.5%)
35
(–26.1%)
36
(–23.1%)
Nielsen Norman Group 100 83
(–17%)
59
(–41.4%)
83
(–16.6%)
59
(–40.6%)
82
(–17.6%)
84
(–15.6%)
Opera 184 127
(–30.7%)
120
(–34.9%)
131
(–28.6%)
83
(–55.1%)
126
(–31.3%)
131
(–28.7%)
OSCE 177 149
(–15.9%)
139
(–21.1%)
149
(–15.8%)
141
(–20.5%)
146
(–17.3%)
149
(–15.6%)
Scrum Guide 34 31
(–9%)
30
(–10.9%)
32
(–7.3%)
31
(–8.3%)
31
(–10.1%)
31
(–7.8%)
SELFHTML 21 18
(–14.2%)
17
(–19.1%)
18
(–14.4%)
18
(–15.8%)
17
(–17.6%)
18
(–14.2%)
SitePoint 262 249
(–4.8%)
232
(–11.4%)
259
(–0.9%)
233
(–10.9%)
250
(–4.6%)
260
(–0.7%)
Smashing Magazine 285 284
(–0.3%)
281
(–1.3%)
285
(–0.1%)
271
(–4.9%)
283
(–0.9%)
285
(+0%)
Startup-Verband 45 33
(–26.4%)
31
(–30.9%)
33
(–26.9%)
32
(–29%)
33
(–28.4%)
33
(–26.5%)
TAZ 451 406
(–10.1%)
378
(–16.2%)
n/a 396
(–12.3%)
405
(–10.2%)
419
(–7.2%)
TetraLogical 60 54
(–10.2%)
50
(–16.8%)
55
(–9.8%)
51
(–16.2%)
54
(–10.4%)
55
(–9.7%)
TPGi 180 135
(–24.9%)
132
(–26.6%)
142
(–21.6%)
117
(–35.4%)
141
(–21.9%)
165
(–8.3%)
United Nations 152 128
(–16.1%)
114
(–25.5%)
124
(–18.5%)
85
(–44%)
125
(–17.6%)
131
(–13.9%)
UX Collective 98 90
(–8.1%)
88
(–10.4%)
92
(–6.2%)
89
(–9.8%)
90
(–8.7%)
97
(–0.9%)
Vivaldi 93 82
(–11.8%)
75
(–19.7%)
83
(–11%)
70
(–24.8%)
82
(–12.4%)
85
(–9.1%)
W3C 51 39
(–22.5%)
36
(–28.8%)
39
(–22.9%)
37
(–27.4%)
38
(–24.2%)
41
(–19%)
WordPress Blog 207 170
(–17.9%)
160
(–22.5%)
179
(–13.2%)
141
(–31.6%)
177
(–14.4%)
193
(–6.6%)
Sites processed (of sites overall) 48/48 48/48 39/48 48/48 48/48 48/48
Average processing time 35 ms 115 ms 1359 ms 313 ms 11 ms 226 ms
Average result (KB) 386 356
(–7.7%)
339
(–12%)
373
(–3.2%)
335
(–13.2%)
354
(–8.3%)
364
(–5.6%)

Benchmarks last updated: Jun 2, 2026

Notes

  • Minifiers:
    • htmlcompressor.com incorrectly converts no-break spaces to spaces which can give an impression of greater effectiveness (last confirmed Apr 4, 2026).
    • minify-html “invalidates” markup, notably by removing spaces in doctypes (<!doctypehtml>) (last confirmed Apr 4, 2026).
    • Minimize only minifies HTML.
    • HTML Minifier Terser is currently not included due to issues around whitespace collapsing and removal of code using modern CSS features, issues which appeared to distort the data.
  • Calculation:
    • Calculations are done based on bytes, which are used to compare effectiveness.
    • Failed sites are not excluded from the calculation for the average result, but counted as unminified. This avoids test failures advantaging the respective minifier.
  • Benchmarks are currently run manually (on a 2024 Apple Mac Mini) but may be automated in the future.

Contributors