Minifier Benchmarks

May 1, 2026 Β· View on GitHub

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/htmlHTML Minifier NexthtmlΒ­comΒ­pressor.Β­comhtmlnanominify-htmlminimize
Last npm updatenpm @swc/htmlnpm HTML Minifier Nextn/anpm htmlnanonpm minify-htmlnpm minimize
Socket health statusSocket @swc/htmlSocket HTML Minifier Nextn/aSocket htmlnanoSocket minify-htmlSocket minimize
GitHub sponsorsSponsors @swc/htmlSponsors HTML Minifier Nextn/an/an/an/a

1. HTML Minification Compared

SiteOriginal Size (KB)@swc/htmlHTML Minifier NexthtmlΒ­comΒ­pressor.Β­comhtmlnanominify-htmlminimize
Minifier Test3126
(–17.2%)
25
(–19.6%)
26
(–17%)
26
(–16.5%)
25
(–19.2%)
26
(–16.3%)
A List Apart6460
(–6.4%)
58
(–8.9%)
59
(–7.2%)
59
(–8.2%)
58
(–8.9%)
59
(–7.3%)
Apple244232
(–5.1%)
225
(–7.8%)
230
(–5.8%)
229
(–6.3%)
228
(–6.9%)
230
(–6.1%)
BBC701697
(–0.7%)
691
(–1.5%)
n/a695
(–0.9%)
692
(–1.4%)
696
(–0.8%)
Bun461451
(–2.2%)
441
(–4.2%)
n/a454
(–1.5%)
452
(–2%)
455
(–1.3%)
CERN15193
(–38.3%)
82
(–45.8%)
96
(–36.7%)
92
(–39.1%)
92
(–39.5%)
93
(–38.5%)
CSS-Tricks168156
(–7.5%)
153
(–9.1%)
155
(–8%)
153
(–8.8%)
153
(–9%)
155
(–8.1%)
DeepSeek105104
(–0.7%)
98
(–7.1%)
104
(–1.1%)
104
(–1.4%)
104
(–1.2%)
104
(–1.1%)
DIN253182
(–28.2%)
176
(–30.6%)
183
(–27.7%)
182
(–28%)
180
(–29%)
183
(–27.8%)
DLR547544
(–0.6%)
541
(–1%)
n/a543
(–0.8%)
542
(–1%)
544
(–0.5%)
ECMAScript72376880
(–4.9%)
6645
(–8.2%)
n/a6757
(–6.6%)
6780
(–6.3%)
6810
(–5.9%)
EDRi8477
(–7.6%)
77
(–8.2%)
78
(–6.6%)
77
(–7.5%)
77
(–8.1%)
78
(–6.7%)
EFF5550
(–8%)
48
(–12.5%)
50
(–7.7%)
49
(–9.9%)
48
(–11.4%)
49
(–9.6%)
European Alternatives4933
(–33.1%)
33
(–33.9%)
33
(–32.9%)
33
(–33.1%)
33
(–33.7%)
33
(–33.1%)
FAZ13891347
(–3%)
1329
(–4.3%)
n/a1344
(–3.2%)
1335
(–3.8%)
1341
(–3.4%)
French Tech154134
(–12.9%)
133
(–13.9%)
134
(–13%)
134
(–13.2%)
133
(–13.9%)
134
(–13.1%)
Front-End Social3634
(–3.7%)
34
(–5.6%)
35
(–3.1%)
34
(–5.5%)
34
(–5.6%)
35
(–3.1%)
Frontend Dogma221229
(+3.6%)
221
(0%)
220
(–0.2%)
234
(+6%)
220
(0%)
239
(+8.3%)
Google79124
(+57.6%)
78
(–0.6%)
79
(–0.3%)
78
(–0.8%)
79
(–0.5%)
79
(–0.3%)
Ground News18041780
(–1.3%)
1741
(–3.5%)
n/a1787
(–0.9%)
1779
(–1.4%)
1790
(–0.8%)
HTML 3.2123119
(–3%)
119
(–3%)
121
(–1.2%)
124
(+0.9%)
119
(–3.2%)
123
(+0.5%)
HTML Living Standard149152
(+1.8%)
148
(–0.6%)
149
(–0.2%)
153
(+2.6%)
149
(–0.3%)
155
(+3.8%)
IETF8334
(–58.7%)
32
(–61.2%)
35
(–58.2%)
34
(–59.3%)
34
(–59.8%)
34
(–58.7%)
Igalia4937
(–24.1%)
34
(–29.4%)
37
(–25.1%)
36
(–25.6%)
36
(–26%)
36
(–25.5%)
Ladybird2423
(–4.6%)
23
(–7.3%)
23
(–5.5%)
23
(–6.1%)
23
(–6.6%)
23
(–5.6%)
Leanpub338334
(–1.3%)
325
(–3.8%)
n/a333
(–1.4%)
331
(–2.1%)
332
(–1.8%)
Legge Stanca1712
(–28.5%)
12
(–30.4%)
12
(–27.3%)
12
(–29.7%)
12
(–30.2%)
12
(–27.5%)
Mastodon3433
(–3.5%)
32
(–5.3%)
33
(–2.9%)
32
(–5.2%)
32
(–5.3%)
33
(–3%)
MDN11771
(–39.2%)
68
(–41.7%)
73
(–37.8%)
73
(–38%)
70
(–40.4%)
72
(–38.2%)
Mistral AI350341
(–2.5%)
339
(–3%)
n/a345
(–1.3%)
341
(–2.6%)
346
(–1.1%)
Mondoweiss400396
(–1.2%)
381
(–4.9%)
n/a385
(–3.9%)
384
(–4.2%)
387
(–3.4%)
Mozilla4737
(–21%)
35
(–25.9%)
37
(–22.3%)
36
(–23.9%)
35
(–26.1%)
36
(–23.1%)
Nielsen Norman Group10084
(–16.2%)
83
(–17.3%)
84
(–15.9%)
85
(–15.5%)
83
(–17%)
85
(–15.5%)
Opera231178
(–22.9%)
173
(–25.1%)
176
(–23.8%)
177
(–23.5%)
175
(–24.4%)
177
(–23.6%)
OSCE177149
(–15.7%)
147
(–16.9%)
149
(–15.7%)
150
(–15.5%)
147
(–17%)
150
(–15.5%)
Scrum Guide3431
(–8.9%)
30
(–10.7%)
32
(–7.3%)
31
(–7.9%)
31
(–10.1%)
31
(–7.8%)
SELFHTML2120
(–7.5%)
18
(–17.3%)
18
(–13.6%)
18
(–14.4%)
18
(–16.7%)
18
(–14.1%)
SitePoint233230
(–1.3%)
229
(–1.5%)
231
(–0.7%)
231
(–0.9%)
230
(–1.1%)
231
(–0.7%)
Smashing Magazine283283
(+0.2%)
281
(–0.6%)
283
(–0.1%)
282
(–0.2%)
281
(–0.4%)
283
(+0%)
Startup-Verband4634
(–26.1%)
33
(–29%)
34
(–26.5%)
34
(–26.9%)
33
(–27.9%)
34
(–26.2%)
TAZ413389
(–5.6%)
370
(–10.4%)
n/a380
(–7.9%)
379
(–8.1%)
382
(–7.4%)
TetraLogical6155
(–10%)
54
(–10.3%)
55
(–9.7%)
55
(–9.7%)
54
(–10.2%)
55
(–9.7%)
TPGi181166
(–8.2%)
163
(–9.7%)
166
(–8.3%)
164
(–9.2%)
163
(–9.4%)
165
(–8.3%)
United Nations152131
(–13.6%)
127
(–16.7%)
131
(–13.7%)
130
(–14.5%)
129
(–15.2%)
131
(–13.9%)
UX Collective96137
(+42.6%)
94
(–2.6%)
95
(–0.8%)
95
(–1.2%)
95
(–1.4%)
95
(–0.9%)
Vivaldi9385
(–8.6%)
84
(–10.5%)
85
(–9.2%)
85
(–9.5%)
84
(–10.5%)
85
(–9.2%)
W3C5141
(–18.7%)
40
(–20.7%)
41
(–19%)
41
(–19.4%)
40
(–20.3%)
41
(–18.9%)
WordPress Blog206191
(–7.4%)
188
(–9%)
192
(–6.8%)
191
(–7.4%)
189
(–8.3%)
193
(–6.6%)
Sites processed (of sites overall)48/4848/4838/4848/4848/4848/48
Average processing time30 ms43 ms773 ms35 ms8 ms189 ms
Average result (KB)374355
(–5.1%)
344
(–8.1%)
363
(–2.9%)
350
(–6.4%)
349
(–6.7%)
352
(–5.9%)

2. Maximum Minification Compared

SiteOriginal Size (KB)@swc/htmlHTML Minifier NexthtmlΒ­comΒ­pressor.Β­comhtmlnanominify-htmlminimize
Minifier Test3124
(–23.3%)
23
(–25.5%)
24
(–22.9%)
23
(–26.5%)
23
(–25.3%)
26
(–16.3%)
A List Apart6458
(–9.6%)
54
(–15.1%)
58
(–10%)
40
(–37%)
56
(–12%)
59
(–7.3%)
Apple244232
(–5.2%)
215
(–11.9%)
230
(–5.9%)
220
(–10.1%)
227
(–7%)
230
(–6.1%)
BBC701660
(–5.9%)
645
(–8%)
n/a656
(–6.5%)
655
(–6.7%)
696
(–0.8%)
Bun461435
(–5.7%)
420
(–8.8%)
n/a374
(–18.9%)
436
(–5.3%)
455
(–1.3%)
CERN15193
(–38.3%)
81
(–46.5%)
96
(–36.7%)
90
(–40.3%)
91
(–39.9%)
93
(–38.5%)
CSS-Tricks168145
(–13.5%)
134
(–20.4%)
147
(–12.4%)
114
(–32.4%)
145
(–13.5%)
155
(–8.1%)
DeepSeek105100
(–5.1%)
84
(–19.9%)
100
(–5.1%)
90
(–14.4%)
99
(–5.4%)
104
(–1.1%)
DIN253175
(–30.8%)
164
(–35.3%)
176
(–30.5%)
136
(–46.3%)
174
(–31.1%)
183
(–27.8%)
DLR547514
(–6%)
504
(–7.8%)
n/a500
(–8.7%)
506
(–7.4%)
544
(–0.5%)
ECMAScript72376880
(–4.9%)
6644
(–8.2%)
n/a6756
(–6.6%)
6780
(–6.3%)
6810
(–5.9%)
EDRi8474
(–11.1%)
70
(–15.8%)
76
(–9.5%)
55
(–34.6%)
74
(–11.3%)
78
(–6.7%)
EFF5549
(–10.7%)
44
(–18.6%)
49
(–9.9%)
47
(–14.1%)
48
(–12.4%)
49
(–9.6%)
European Alternatives4933
(–33.2%)
31
(–37.7%)
33
(–33%)
31
(–37%)
33
(–33.8%)
33
(–33.1%)
FAZ13891340
(–3.5%)
1284
(–7.5%)
n/a1213
(–12.7%)
1329
(–4.3%)
1341
(–3.4%)
French Tech154128
(–17%)
124
(–20%)
129
(–16.4%)
53
(–65.5%)
127
(–17.5%)
134
(–13.1%)
Front-End Social3634
(–3.7%)
31
(–13.9%)
35
(–3.1%)
31
(–13.8%)
34
(–5.6%)
35
(–3.1%)
Frontend Dogma221229
(+3.6%)
213
(–3.4%)
220
(–0.2%)
225
(+2.2%)
220
(0%)
239
(+8.3%)
Google7975
(–5%)
74
(–5.7%)
78
(–0.8%)
63
(–19.9%)
76
(–3.7%)
79
(–0.3%)
Ground News18041689
(–6.3%)
1615
(–10.5%)
n/a1663
(–7.8%)
1687
(–6.5%)
1790
(–0.8%)
HTML 3.2123119
(–3.1%)
118
(–3.4%)
121
(–1.3%)
123
(+0.7%)
119
(–3.3%)
123
(+0.5%)
HTML Living Standard149152
(+1.8%)
148
(–0.7%)
149
(–0.3%)
153
(+2.5%)
149
(–0.3%)
155
(+3.8%)
IETF8334
(–59%)
32
(–62%)
35
(–58.3%)
33
(–60%)
33
(–59.9%)
34
(–58.7%)
Igalia4936
(–25.4%)
33
(–31.8%)
36
(–26%)
35
(–28.2%)
35
(–27.4%)
36
(–25.5%)
Ladybird2423
(–4.6%)
22
(–8.7%)
23
(–5.5%)
23
(–7.7%)
23
(–6.6%)
23
(–5.6%)
Leanpub338323
(–4.3%)
306
(–9.5%)
n/a314
(–7%)
321
(–5.2%)
332
(–1.8%)
Legge Stanca1710
(–43.8%)
9
(–46.5%)
10
(–42.7%)
9
(–46.5%)
10
(–40.5%)
12
(–27.5%)
Mastodon3432
(–4.9%)
29
(–15.2%)
33
(–3.3%)
29
(–15.1%)
32
(–5.7%)
33
(–3%)
MDN11771
(–39.3%)
67
(–42.8%)
73
(–37.8%)
55
(–52.9%)
70
(–40.5%)
72
(–38.2%)
Mistral AI350318
(–9.2%)
302
(–13.7%)
n/a309
(–11.6%)
317
(–9.5%)
346
(–1.1%)
Mondoweiss400377
(–5.8%)
364
(–9%)
n/a358
(–10.7%)
373
(–6.9%)
387
(–3.4%)
Mozilla4737
(–21%)
32
(–31.7%)
37
(–22.3%)
33
(–29.6%)
35
(–26.1%)
36
(–23.1%)
Nielsen Norman Group10083
(–17%)
59
(–41.2%)
84
(–16.5%)
60
(–40.5%)
83
(–17.5%)
85
(–15.5%)
Opera231173
(–25%)
147
(–36.6%)
176
(–24%)
109
(–52.7%)
170
(–26.3%)
177
(–23.6%)
OSCE177149
(–15.7%)
140
(–21%)
149
(–15.7%)
141
(–20.4%)
147
(–17.2%)
150
(–15.5%)
Scrum Guide3431
(–9%)
30
(–10.9%)
32
(–7.3%)
31
(–8.3%)
31
(–10.1%)
31
(–7.8%)
SELFHTML2118
(–14.1%)
17
(–19%)
18
(–14.3%)
18
(–15.8%)
18
(–17.5%)
18
(–14.1%)
SitePoint233221
(–5%)
208
(–10.6%)
231
(–1%)
210
(–10%)
222
(–4.8%)
231
(–0.7%)
Smashing Magazine283282
(–0.3%)
279
(–1.4%)
282
(–0.1%)
269
(–5%)
280
(–0.9%)
283
(+0%)
Startup-Verband4634
(–26.2%)
32
(–30.6%)
34
(–26.6%)
33
(–28.6%)
33
(–28.1%)
34
(–26.2%)
TAZ413370
(–10.5%)
345
(–16.5%)
n/a360
(–12.8%)
369
(–10.6%)
382
(–7.4%)
TetraLogical6154
(–10.2%)
50
(–16.8%)
55
(–9.9%)
51
(–16.4%)
54
(–10.4%)
55
(–9.7%)
TPGi181135
(–24.9%)
132
(–26.6%)
142
(–21.6%)
117
(–35.4%)
141
(–21.9%)
165
(–8.3%)
United Nations152128
(–16.1%)
113
(–25.5%)
124
(–18.5%)
85
(–44.1%)
125
(–17.7%)
131
(–13.9%)
UX Collective9689
(–7.1%)
87
(–9.4%)
91
(–5.1%)
88
(–8.8%)
89
(–7.7%)
95
(–0.9%)
Vivaldi9382
(–11.9%)
75
(–19.7%)
83
(–11%)
70
(–25.2%)
82
(–12.5%)
85
(–9.2%)
W3C5139
(–22.4%)
36
(–28.7%)
39
(–22.8%)
37
(–27.3%)
38
(–24.1%)
41
(–18.9%)
WordPress Blog206169
(–17.9%)
160
(–22.5%)
179
(–13.2%)
141
(–31.7%)
177
(–14.4%)
193
(–6.6%)
Sites processed (of sites overall)48/4848/4838/4848/4848/4848/48
Average processing time35 ms65 ms1323 ms140 ms11 ms190 ms
Average result (KB)374345
(–7.7%)
330
(–11.8%)
361
(–3.5%)
327
(–12.7%)
342
(–8.6%)
352
(–5.9%)

Benchmarks last updated: May 1, 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.