Skip to content

j9t/minifier-benchmarks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

122 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

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 59
(–5.8%)
57
(–8.4%)
58
(–7.2%)
58
(–7.7%)
57
(–8.4%)
58
(–7.3%)
Apple 243 231
(–5.1%)
225
(–7.6%)
229
(–5.8%)
228
(–6.3%)
227
(–6.9%)
229
(–6.1%)
BBC 835 830
(–0.6%)
823
(–1.5%)
n/a 826
(–1%)
823
(–1.4%)
828
(–0.8%)
Bun 283 272
(–3.8%)
264
(–6.8%)
278
(–1.7%)
276
(–2.6%)
273
(–3.4%)
276
(–2.4%)
CERN 301 289
(–3.8%)
281
(–6.5%)
n/a 288
(–4.2%)
287
(–4.7%)
288
(–4.1%)
CSS-Tricks 148 136
(–7.9%)
134
(–9.8%)
135
(–9.1%)
134
(–9.5%)
134
(–9.7%)
135
(–9%)
DeepSeek 147 146
(–0.6%)
139
(–5.2%)
146
(–0.8%)
145
(–1.1%)
146
(–0.9%)
146
(–0.8%)
DIN 254 183
(–28.3%)
176
(–30.7%)
184
(–27.8%)
182
(–28.3%)
180
(–29.1%)
183
(–27.9%)
DLR 565 561
(–0.6%)
559
(–1%)
n/a 560
(–0.8%)
559
(–1%)
562
(–0.5%)
ECMAScript 7421 7054
(–4.9%)
6813
(–8.2%)
n/a 6929
(–6.6%)
6952
(–6.3%)
6983
(–5.9%)
EDRi 84 78
(–7.7%)
77
(–8.2%)
78
(–6.6%)
78
(–7.6%)
77
(–8.1%)
78
(–6.7%)
EFF 53 49
(–8.1%)
46
(–12.7%)
49
(–7.9%)
48
(–10.1%)
47
(–11.6%)
48
(–9.8%)
European Alternatives 49 33
(–33.1%)
33
(–33.9%)
33
(–32.9%)
33
(–33.1%)
33
(–33.7%)
33
(–33.1%)
FAZ 1579 1528
(–3.2%)
1451
(–8.1%)
n/a 1526
(–3.3%)
1519
(–3.8%)
1523
(–3.5%)
French Tech 175 140
(–20%)
139
(–20.7%)
141
(–19.7%)
140
(–20%)
139
(–20.6%)
141
(–19.8%)
Front-End Social 43 41
(–4.1%)
40
(–6.4%)
42
(–3.4%)
40
(–6.3%)
40
(–6.4%)
42
(–3.5%)
Frontend Dogma 224 232
(+3.6%)
224
(0%)
223
(–0.2%)
237
(+5.9%)
224
(–0.1%)
243
(+8.3%)
Google 80 123
(+54.7%)
79
(–0.6%)
79
(–0.3%)
79
(–0.8%)
79
(–0.5%)
79
(–0.3%)
Ground News 3480 3457
(–0.7%)
3417
(–1.8%)
n/a 3461
(–0.5%)
3455
(–0.7%)
3466
(–0.4%)
HTML 3.2 123 119
(–3%)
119
(–3%)
121
(–1.2%)
124
(+0.8%)
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 82 34
(–58.4%)
32
(–61%)
34
(–57.9%)
33
(–59%)
33
(–59.5%)
34
(–58.4%)
Igalia 43 34
(–21.4%)
32
(–27.2%)
34
(–22.5%)
33
(–23%)
33
(–23.5%)
33
(–22.9%)
Ladybird 30 28
(–3.9%)
28
(–6.4%)
28
(–5%)
28
(–5.4%)
28
(–5.7%)
28
(–5%)
Leanpub 348 344
(–1.1%)
337
(–3%)
n/a 344
(–1.2%)
341
(–1.9%)
342
(–1.6%)
Legge Stanca 17 12
(–28.5%)
12
(–30.4%)
12
(–27.3%)
12
(–30%)
12
(–30.2%)
12
(–27.5%)
Mastodon 43 41
(–4.1%)
40
(–6.4%)
41
(–3.4%)
40
(–6.4%)
40
(–6.4%)
41
(–3.5%)
MDN 119 71
(–40.2%)
68
(–42.7%)
73
(–38.8%)
72
(–39.5%)
69
(–41.4%)
72
(–39.2%)
Mistral AI 423 410
(–3.1%)
339
(–20%)
n/a 422
(–0.3%)
411
(–2.8%)
423
(0%)
Mondoweiss 406 401
(–1.1%)
385
(–5%)
n/a 390
(–3.9%)
389
(–4.1%)
391
(–3.6%)
Mozilla 47 37
(–21%)
35
(–25.8%)
37
(–22.2%)
36
(–23.8%)
35
(–26%)
36
(–23%)
Nielsen Norman Group 103 86
(–16.3%)
85
(–17.3%)
86
(–15.9%)
87
(–15.5%)
85
(–17%)
87
(–15.5%)
Opera 185 135
(–26.9%)
132
(–28.6%)
135
(–27.1%)
134
(–27.4%)
134
(–27.7%)
134
(–27.5%)
OSCE 172 145
(–16%)
143
(–17.2%)
145
(–15.9%)
145
(–15.7%)
142
(–17.3%)
145
(–15.7%)
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.6%)
17
(–16.8%)
18
(–14.2%)
SitePoint 242 239
(–1.3%)
238
(–1.5%)
240
(–0.7%)
240
(–0.9%)
239
(–1.1%)
240
(–0.7%)
Smashing Magazine 310 311
(+0.2%)
309
(–0.5%)
n/a 310
(–0.2%)
309
(–0.4%)
310
(0%)
Startup-Verband 51 38
(–26.3%)
36
(–29.3%)
37
(–27.2%)
37
(–27.7%)
36
(–28.4%)
37
(–27.1%)
TAZ 432 407
(–5.7%)
387
(–10.5%)
n/a 398
(–7.7%)
397
(–8%)
400
(–7.3%)
TetraLogical 60 54
(–10.1%)
54
(–10.5%)
54
(–9.8%)
54
(–9.8%)
54
(–10.3%)
54
(–9.8%)
TPGi 177 162
(–8.5%)
160
(–9.9%)
162
(–8.5%)
161
(–9.3%)
160
(–9.6%)
162
(–8.5%)
United Nations 154 133
(–13.5%)
128
(–16.6%)
133
(–13.6%)
131
(–14.5%)
130
(–15.1%)
132
(–13.8%)
UX Collective 153 197
(+29%)
149
(–2.2%)
152
(–0.8%)
151
(–1.3%)
150
(–1.4%)
149
(–2.6%)
Vivaldi 91 83
(–8.8%)
82
(–10.7%)
83
(–9.5%)
82
(–9.8%)
82
(–10.8%)
83
(–9.4%)
W3C 52 42
(–18.4%)
41
(–20.4%)
42
(–18.7%)
42
(–19%)
42
(–19.9%)
42
(–18.6%)
WordPress Blog 221 203
(–8%)
200
(–9.5%)
205
(–7.5%)
203
(–8.1%)
202
(–8.8%)
205
(–7.2%)
Sites processed (of sites overall) 48/48 48/48 37/48 48/48 48/48 48/48
Average processing time 30 ms 39 ms 771 ms 39 ms 9 ms 197 ms
Average result (KB) 424 405
(–4.5%)
391
(–7.7%)
414
(–2.4%)
400
(–5.6%)
399
(–5.9%)
402
(–5.2%)

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%)
53
(–14.8%)
56
(–10%)
39
(–37.4%)
55
(–11.7%)
58
(–7.3%)
Apple 243 231
(–5.2%)
215
(–11.6%)
229
(–5.8%)
219
(–10.1%)
227
(–6.9%)
229
(–6.1%)
BBC 835 786
(–5.8%)
769
(–7.9%)
n/a 780
(–6.5%)
780
(–6.6%)
828
(–0.8%)
Bun 283 272
(–3.9%)
259
(–8.3%)
278
(–1.7%)
272
(–4%)
273
(–3.4%)
276
(–2.4%)
CERN 301 273
(–9.1%)
259
(–14%)
n/a 216
(–28%)
272
(–9.7%)
288
(–4.1%)
CSS-Tricks 148 131
(–11.3%)
119
(–19.3%)
130
(–11.9%)
103
(–30.6%)
129
(–12.8%)
135
(–9%)
DeepSeek 147 141
(–4.1%)
117
(–20.2%)
141
(–4%)
123
(–16.3%)
141
(–4.2%)
146
(–0.8%)
DIN 254 176
(–30.8%)
164
(–35.4%)
177
(–30.6%)
136
(–46.5%)
175
(–31.2%)
183
(–27.9%)
DLR 565 530
(–6.1%)
520
(–7.8%)
n/a 516
(–8.7%)
523
(–7.5%)
562
(–0.5%)
ECMAScript 7421 7054
(–4.9%)
6812
(–8.2%)
n/a 6928
(–6.6%)
6952
(–6.3%)
6983
(–5.9%)
EDRi 84 75
(–11.2%)
71
(–16%)
76
(–9.6%)
55
(–34.7%)
74
(–11.3%)
78
(–6.7%)
EFF 53 47
(–10.9%)
43
(–18.9%)
48
(–10.2%)
45
(–14.4%)
46
(–12.6%)
48
(–9.8%)
European Alternatives 49 33
(–33.2%)
31
(–37.7%)
33
(–33%)
31
(–37%)
33
(–33.8%)
33
(–33.1%)
FAZ 1579 1458
(–7.7%)
1396
(–11.5%)
n/a 1326
(–16%)
1511
(–4.2%)
1523
(–3.5%)
French Tech 175 134
(–23.7%)
129
(–26.6%)
135
(–23.1%)
59
(–66.6%)
133
(–24.2%)
141
(–19.8%)
Front-End Social 43 41
(–5.2%)
37
(–14.4%)
41
(–3.7%)
37
(–14.2%)
40
(–6.7%)
42
(–3.5%)
Frontend Dogma 224 232
(+3.6%)
217
(–3.3%)
223
(–0.2%)
229
(+2.3%)
224
(–0.1%)
243
(+8.3%)
Google 80 76
(–4.6%)
75
(–5.3%)
79
(–0.8%)
64
(–19.7%)
77
(–3.6%)
79
(–0.3%)
Ground News 3480 3242
(–6.8%)
3167
(–9%)
n/a 3207
(–7.8%)
3232
(–7.1%)
3466
(–0.4%)
HTML 3.2 123 119
(–3.1%)
118
(–3.4%)
121
(–1.3%)
123
(+0.6%)
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 82 34
(–58.7%)
31
(–61.8%)
34
(–58.1%)
33
(–59.8%)
33
(–59.7%)
34
(–58.4%)
Igalia 43 33
(–23%)
31
(–29.6%)
33
(–23.5%)
32
(–25.6%)
33
(–25%)
33
(–22.9%)
Ladybird 30 28
(–3.9%)
27
(–7.7%)
28
(–5%)
25
(–14.1%)
28
(–5.7%)
28
(–5%)
Leanpub 348 334
(–3.9%)
318
(–8.6%)
n/a 325
(–6.6%)
331
(–4.8%)
342
(–1.6%)
Legge Stanca 17 10
(–43.8%)
9
(–46.5%)
10
(–42.7%)
9
(–46.7%)
10
(–40.5%)
12
(–27.5%)
Mastodon 43 41
(–5.2%)
37
(–14.4%)
41
(–3.7%)
37
(–14.3%)
40
(–6.7%)
41
(–3.5%)
MDN 119 71
(–40.3%)
67
(–43.8%)
72
(–38.9%)
55
(–53.7%)
69
(–41.5%)
72
(–39.2%)
Mistral AI 423 410
(–3.2%)
258
(–39.1%)
n/a 332
(–21.6%)
411
(–2.9%)
423
(0%)
Mondoweiss 406 383
(–5.5%)
369
(–8.9%)
n/a 363
(–10.6%)
378
(–6.8%)
391
(–3.6%)
Mozilla 47 37
(–21%)
32
(–31.6%)
37
(–22.2%)
33
(–29.4%)
35
(–26%)
36
(–23%)
Nielsen Norman Group 103 85
(–17%)
60
(–41.7%)
86
(–16.6%)
61
(–41%)
85
(–17.6%)
87
(–15.5%)
Opera 185 131
(–29.5%)
123
(–33.7%)
135
(–27.3%)
85
(–54%)
130
(–30.1%)
134
(–27.5%)
OSCE 172 144
(–16%)
135
(–21.3%)
145
(–15.9%)
137
(–20.7%)
142
(–17.4%)
145
(–15.7%)
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
(–16%)
17
(–17.6%)
18
(–14.2%)
SitePoint 242 230
(–5%)
216
(–10.6%)
232
(–4.2%)
218
(–10%)
230
(–4.9%)
240
(–0.7%)
Smashing Magazine 310 309
(–0.3%)
306
(–1.2%)
n/a 293
(–5.4%)
308
(–0.8%)
310
(0%)
Startup-Verband 51 37
(–26.4%)
35
(–31.1%)
37
(–27.3%)
36
(–29.6%)
36
(–28.6%)
37
(–27.1%)
TAZ 432 387
(–10.3%)
361
(–16.4%)
n/a 378
(–12.4%)
387
(–10.3%)
400
(–7.3%)
TetraLogical 60 54
(–10.3%)
50
(–17%)
54
(–9.9%)
50
(–16.4%)
54
(–10.5%)
54
(–9.8%)
TPGi 177 136
(–23.4%)
133
(–25.1%)
142
(–20%)
117
(–34.2%)
138
(–22.3%)
162
(–8.5%)
United Nations 154 129
(–16%)
115
(–25.3%)
125
(–18.4%)
86
(–43.8%)
127
(–17.5%)
132
(–13.8%)
UX Collective 153 143
(–6.5%)
130
(–15.2%)
151
(–1.4%)
130
(–14.9%)
141
(–7.7%)
149
(–2.6%)
Vivaldi 91 80
(–12%)
73
(–20%)
81
(–11.5%)
64
(–29.8%)
79
(–13.1%)
83
(–9.4%)
W3C 52 41
(–22%)
37
(–28.3%)
40
(–22.4%)
38
(–26.9%)
40
(–23.6%)
42
(–18.6%)
WordPress Blog 221 182
(–17.9%)
171
(–22.7%)
191
(–13.6%)
153
(–30.9%)
189
(–14.7%)
205
(–7.2%)
Sites processed (of sites overall) 48/48 48/48 37/48 48/48 48/48 48/48
Average processing time 35 ms 61 ms 1322 ms 153 ms 10 ms 192 ms
Average result (KB) 424 392
(–7.6%)
373
(–11.9%)
412
(–2.9%)
371
(–12.4%)
389
(–8.1%)
402
(–5.2%)

Benchmarks last updated: Jul 20, 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.

Used by

Contributors

Languages