In my comparison of PNG compressors I was also curious to see what WebP, a modern image format, could do with the same set of images. So, I converted all images losslessly to WebP and included the WebP numbers too in the tables.
This test expands the comparison to add another three modern image formats: AVIF, HEIF, and JPEG XL. The image set is the same that I used in the comparison of the PNG tools.
The results are presented in the tables below.
The results are also available in a Google Sheets document: op111.net, 2025-10-15, PNG and modern image formats
And in the file with the hyperfine measurements: op111-20251015-png-modern-formats-hyperfine-data.txt
For the hardware, operating systems, and tool versions used, see section at the bottom.
IMPORTANT NOTE
This test compares PNG with four modern image formats at what PNG is best for (lossless compression of graphics images, not compression of photographs) rather than what the modern formats are best for.
The four modern image formats—AVIF, HEIF, JPEG XL, and WebP—were not designed with the same goals as PNG, or with the same goals with each other, and, while all have a lossless mode, lossless compression was not a primary design goal in all of them.
For any questions, corrections, or if you just want to say hi, please use the contact form.
d3js.org.png
![]()
Screenshot of the D3.js homepage I took in Firefox, Debian 13 (GNOME 48, Wayland), using the FireShot extension.
- Filename: d3js.org.png
- Original size: 1,493,211 bytes
- Dimensions: 1600 × 1205 pixels
- Number of colors: 168,716
- Original image: d3js.org.png
COMPRESSION RESULTS FOR d3js.org.png
| Program and settings | Time | Size | Reduction |
|---|---|---|---|
| oxipng default | 0.764s | 1,058,046 | 29.14% |
oxipng --opt max | 1.937s | 1,046,446 | 29.92% |
oxipng --opt max --zopfli --fast | 20.504s | 1,041,552 | 30.25% |
oxipng --opt max --zopfli | 28.986s | 1,041,552 | 30.25% |
avifenc -l | 0.415s | 1,394,551 | 6.61% |
avifenc -l --speed 0 | 8.062s | 1,087,371 | 27.18% |
heif-enc -l | 0.408s | 1,322,757 | 11.42% |
heif-enc -l -p preset=veryslow | 0.408s | 1,322,616 | 11.42% |
cjxl -q 100 | 1.506s | 697,978 | 53.26% |
cjxl -q 100 --effort 9 | 5.967s | 676,891 | 54.67% |
cwebp -lossless -mt -exact… | 0.532s | 828,992 | 44.48% |
cwebp -lossless -mt -z 9 -exact… | 3.845s | 813,606 | 45.51% |
NOTES
- JPEG XL wins.
- WebP is second.
- JPEG XL is 24.42 percentage points better than PNG.
- WebP is 15.26 percentage points better than PNG.
debian-desktop.png
![]()
Screenshot of my Debian desktop I took with the GNOME screenshot tool (Debian 13, GNOME 48, Wayland).
- Filename: debian-desktop.png
- Original size: 707,471 bytes
- Dimensions: 2560 × 1440 pixels
- Number of colors: 20,322
- Original image: debian-desktop.png
COMPRESSION RESULTS FOR debian-desktop.png
| Program and settings | Time | Size | Reduction |
|---|---|---|---|
| oxipng default | 1.488s | 448,544 | 36.60% |
oxipng --opt max | 7.005s | 392,710 | 44.49% |
oxipng --opt max --zopfli --fast | 64.088s | 431,815 | 38.96% |
oxipng --opt max --zopfli | 156.336s | 382,459 | 45.94% |
avifenc -l | 0.894s | 496,641 | 29.80% |
avifenc -l --speed 0 | 14.760s | 413,593 | 41.54% |
heif-enc -l | 0.484s | 394,584 | 44.23% |
heif-enc -l -p preset=veryslow | 0.489s | 394,636 | 44.22% |
cjxl -q 100 | 0.345s | 270,403 | 61.78% |
cjxl -q 100 --effort 9 | 1.190s | 215,986 | 69.47% |
cwebp -lossless -mt -exact… | 0.864s | 328,602 | 53.55% |
cwebp -lossless -mt -z 9 -exact… | 2.373s | 264,570 | 62.60% |
NOTES
- JPEG XL wins.
- WebP is second.
- JPEG XL is 23.53 percentage points better than PNG.
- WebP is 16.66 percentage points better than PNG.
drought-map.png
![]()
Map showing drought conditions in Europe from the European Environment Agency.
- Filename: drought-map.png
- Original size: 976,919 bytes
- Dimensions: 2012 × 2293 pixels
- Number of colors: 4,772
- Source: https://www.eea.europa.eu/en/analysis/maps-and-charts/map-of-the-combined-drought
- Original filename: FIG2.1-261898-Map-extent-v7b.png
COMPRESSION RESULTS FOR drought-map.png
| Program and settings | Time | Size | Reduction |
|---|---|---|---|
| oxipng default | 1.623s | 601,965 | 38.38% |
oxipng --opt max | 5.247s | 589,602 | 39.65% |
oxipng --opt max --zopfli --fast | 85.481s | 580,993 | 40.53% |
oxipng --opt max --zopfli | 109.564s | 580,993 | 40.53% |
avifenc -l | 4.966s | 1,213,395 | -24.21% |
avifenc -l --speed 0 | 95.062s | 1,043,139 | -6.78% |
heif-enc -l | 0.529s | 1,874,253 | -91.85% |
heif-enc -l -p preset=veryslow | 0.537s | 1,871,735 | -91.60% |
cjxl -q 100 | 0.327s | 535,579 | 45.18% |
cjxl -q 100 --effort 9 | 0.841s | 495,820 | 49.25% |
cwebp -lossless -mt -exact… | 0.304s | 374,356 | 61.68% |
cwebp -lossless -mt -z 9 -exact… | 3.401s | 369,064 | 62.22% |
NOTES
- WebP wins.
- JPEG XL is second.
- JPEG XL is 8.72 percentage points better than PNG (second smallest difference in the set).
- WebP is 21.69 percentage points better than PNG.
github.com-repo.png
![]()
Screenshot of the oxipng repo on GitHub I took in Chrome on Debian using the FireShot extension.
- Filename: github.com-repo.png
- Original size: 269,531 bytes
- Dimensions: 1352 × 1105 pixels
- Number of colors: 5,720
- Original image: github.com-repo.png
COMPRESSION RESULTS FOR github.com-repo.png
| Program and settings | Time | Size | Reduction |
|---|---|---|---|
| oxipng default | 0.310s | 169,022 | 37.29% |
oxipng --opt max | 0.913s | 167,590 | 37.82% |
oxipng --opt max --zopfli --fast | 21.438s | 162,970 | 39.54% |
oxipng --opt max --zopfli | 25.154s | 162,970 | 39.54% |
avifenc -l | 1.887s | 254,936 | 5.41% |
avifenc -l --speed 0 | 26.852s | 204,507 | 24.12% |
heif-enc -l | 0.199s | 422,032 | -56.58% |
heif-enc -l -p preset=veryslow | 0.199s | 421,144 | -55.25% |
cjxl -q 100 | 0.604s | 112,142 | 58.39% |
cjxl -q 100 --effort 9 | 1.981s | 106,986 | 60.31% |
cwebp -lossless -mt -exact… | 0.070s | 76,358 | 71.67% |
cwebp -lossless -mt -z 9 -exact… | 1.069s | 70,084 | 74.00% |
NOTES
- WebP wins.
- JPEG XL is second.
- JPEG XL is 20.77 percentage points better than PNG.
- WebP is 34.46 percentage points better than PNG (second biggest difference in the set).
goaccess.io-demo.png
![]()
Screenshot of the GoAccess demo page I took in Firefox on Debian using the FireShot extension.
- Filename: goaccess.io-demo.png
- Original size: 325,494 bytes
- Dimensions: 1600 × 1205 pixels
- Number of colors: 3,032
- Original image: goaccess.io-demo.png
COMPRESSION RESULTS FOR goaccess.io-demo.png
| Program and settings | Time | Size | Reduction |
|---|---|---|---|
| oxipng default | 0.605s | 201,055 | 38.23% |
oxipng --opt max | 1.421s | 193,235 | 40.63% |
oxipng --opt max --zopfli --fast | 32.375s | 189,059 | 41.92% |
oxipng --opt max --zopfli | 41.427s | 189,059 | 41.92% |
avifenc -l | 2.085s | 395,808 | -21.60% |
avifenc -l --speed 0 | 32.237s | 296,895 | 8.79% |
heif-enc -l | 0.326s | 690,102 | -112.02% |
heif-enc -l -p preset=veryslow | 0.329s | 688,626 | -111.56% |
cjxl -q 100 | 0.849s | 123,515 | 62.05% |
cjxl -q 100 --effort 9 | 2.878s | 115,626 | 64.48% |
cwebp -lossless -mt -exact… | 0.091s | 89,142 | 72.61% |
cwebp -lossless -mt -z 9 -exact… | 1.818s | 88,022 | 72.96% |
NOTES
- WebP wins.
- JPEG XL is second.
- JPEG XL is 22.56 percentage points better than PNG.
- WebP is 31.04 percentage points better than PNG.
html5-logo.png
![]()
The official HTML5 logo from W3C.
- Filename: html5-logo.png
- Original size: 8,562 bytes
- Dimensions: 512 × 512 pixels
- Number of colors: 84
- Source: https://www.w3.org/html/logo/
- Original filename: HTML5_Logo_512.png
COMPRESSION RESULTS FOR html5-logo.png
| Program and settings | Time | Size | Reduction |
|---|---|---|---|
| oxipng default | 0.052s | 5,147 | 39.89% |
oxipng --opt max | 0.191s | 4,429 | 48.27% |
oxipng --opt max --zopfli --fast | 2.046s | 4,273 | 50.09% |
oxipng --opt max --zopfli | 3.528s | 4,131 | 51.75% |
avifenc -l | 0.291s | 11,736 | -37.07% |
avifenc -l --speed 0 | 3.583s | 10,765 | -25.73% |
heif-enc -l | 0.111s | 20,586 | -140.43% |
heif-enc -l -p preset=veryslow | 0.110s | 20,630 | -140.95% |
cjxl -q 100 | 0.095s | 2,614 | 69.47% |
cjxl -q 100 --effort 9 | 0.205s | 2,233 | 73.92% |
cwebp -lossless -mt -exact… | 0.015s | 3,416 | 60.10% |
cwebp -lossless -mt -z 9 -exact… | 0.497s | 3,460 | 59.59% |
NOTES
- JPEG XL wins.
- WebP is second.
- JPEG XL is 22.72 percentage points better than PNG.
- WebP is 8.35 percentage points better than PNG (second smallest difference in the set).
mediawiki-logo.png
![]()
The MediaWiki logo.
- Filename: mediawiki-logo.png
- Original size: 28,656 bytes
- Dimensions: 270 × 300 pixels
- Number of colors: 4,635
- Source: https://commons.wikimedia.org/wiki/File:MediaWiki-2020-logo.svg
- Original filename: 270px-MediaWiki-2020-logo.svg.png
COMPRESSION RESULTS FOR mediawiki-logo.png
| Program and settings | Time | Size | Reduction |
|---|---|---|---|
| oxipng default | 0.046s | 24,632 | 14.04% |
oxipng --opt max | 0.171s | 24,664 | 13.93% |
oxipng --opt max --zopfli --fast | 1.363s | 24,211 | 15.51% |
oxipng --opt max --zopfli | 2.816s | 24,211 | 15.51% |
avifenc -l | 0.048s | 39,557 | -38.04% |
avifenc -l --speed 0 | 1.190s | 33,335 | -16.33% |
heif-enc -l | 0.092s | 29,217 | -1.96% |
heif-enc -l -p preset=veryslow | 0.094s | 29,195 | -1.88% |
cjxl -q 100 | 0.091s | 19,986 | 30.26% |
cjxl -q 100 --effort 9 | 0.346s | 16,118 | 43.75% |
cwebp -lossless -mt -exact… | 0.058s | 19,830 | 30.80% |
cwebp -lossless -mt -z 9 -exact… | 0.367s | 17,918 | 37.47% |
NOTES
- JPEG XL wins.
- WebP is second.
- JPEG XL is 28.24 percentage points better than PNG (second biggest difference in the set).
- WebP is 21.96 percentage points better than PNG.
powertoys.png
![]()
Screenshot of the Microsoft PowerToys settings window I took on Windows 11 and saved with Paint.NET v5.1.9.
- Filename: powertoys.png
- Original size: 244,630 bytes
- Dimensions: 1230 × 917 pixels
- Number of colors: 18,791
- Original image: powertoys.png
COMPRESSION RESULTS FOR powertoys.png
| Program and settings | Time | Size | Reduction |
|---|---|---|---|
| oxipng default | 0.266s | 201,533 | 17.62% |
oxipng --opt max | 0.725s | 198,008 | 19.06% |
oxipng --opt max --zopfli --fast | 8.663s | 194,709 | 20.41% |
oxipng --opt max --zopfli | 13.882s | 194,709 | 20.41% |
avifenc -l | 1.572s | 271,010 | -10.78% |
avifenc -l --speed 0 | 18.772s | 252,120 | -3.06% |
heif-enc -l | 0.200s | 343,268 | -40.32% |
heif-enc -l -p preset=veryslow | 0.204s | 342,830 | -40.14% |
cjxl -q 100 | 0.592s | 141,994 | 41.96% |
cjxl -q 100 --effort 9 | 2.521s | 138,672 | 43.31% |
cwebp -lossless -mt -exact… | 0.178s | 144,246 | 41.04% |
cwebp -lossless -mt -z 9 -exact… | 0.975s | 140,090 | 42.73% |
NOTES
- JPEG XL wins.
- WebP is second.
- JPEG XL is 22.90 percentage points better than PNG.
- WebP is 22.32 percentage points better than PNG.
pschmidt.png
![]()
Test image created by Paul Schmidt, member of the PNG Development Group. It has 16,777,216 unique colors, which is the maximum number of colors for the most common “full color” PNG format (three 8-bit channels for red, green, and blue).
- Filename: pschmidt.png
- Original size: 59,852 bytes
- Dimensions: 4096 × 4096 pixels
- Number of colors: 16,777,216
- Source: www.libpng.org/pub/png/img_png/16million-pschmidt.png
- Original filename: 16million-pschmidt.png
COMPRESSION RESULTS FOR pschmidt.png
| Program and settings | Time | Size | Reduction |
|---|---|---|---|
| oxipng default | 1.411s | 59,840 | 0.02% |
oxipng --opt max | 2.770s | 57,757 | 3.50% |
oxipng --opt max --zopfli --fast | 309.241s | 55,989 | 6.45% |
oxipng --opt max --zopfli | 408.220s | 55,989 | 6.45% |
avifenc -l | 1.134s | 1,569,098 | -2521.63% |
avifenc -l --speed 0 | 3.802s | 7,754 | 87.04% |
heif-enc -l | 1.816s | 4,625,714 | -7628.59% |
heif-enc -l -p preset=veryslow | 1.811s | 4,629,216 | -7634.44% |
cjxl -q 100 | 1.627s | 34,734 | 41.97% |
cjxl -q 100 --effort 9 | 4.533s | 21,540 | 64.01% |
cwebp -lossless -mt -exact… | 1.574s | 7,420 | 87.60% |
cwebp -lossless -mt -z 9 -exact… | 4.129s | 5,516 | 90.78% |
NOTES
- WebP wins.
- AVIF is second.
- JPEG XL is 57.56 percentage points better than PNG (biggest difference in the set).
- WebP is 84.33 percentage points better than PNG (biggest difference in the set).
radar-chart.png
![]()
Sample radar chart from the Chart.js documentation.
- Filename: radar-chart.png
- Original size: 121,683 bytes
- Dimensions: 800 × 800 pixels
- Number of colors: 2,039
- Source: https://www.chartjs.org/docs/latest/samples/other-charts/radar.html
COMPRESSION RESULTS FOR radar-chart.png
| Program and settings | Time | Size | Reduction |
|---|---|---|---|
| oxipng default | 0.283s | 73,402 | 39.68% |
oxipng --opt max | 1.008s | 71,484 | 41.25% |
oxipng --opt max --zopfli --fast | 11.468s | 68,927 | 43.36% |
oxipng --opt max --zopfli | 19.364s | 68,927 | 43.36% |
avifenc -l | 0.181s | 138,217 | -13.59% |
avifenc -l --speed 0 | 3.257s | 121,920 | -0.19% |
heif-enc -l | 0.168s | 110,511 | 9.18% |
heif-enc -l -p preset=veryslow | 0.171s | 110,628 | 9.09% |
cjxl -q 100 | 0.305s | 67,560 | 44.48% |
cjxl -q 100 --effort 9 | 1.225s | 60,940 | 49.92% |
cwebp -lossless -mt -exact… | 0.181s | 58,394 | 52.01% |
cwebp -lossless -mt -z 9 -exact… | 0.906s | 44,408 | 63.51% |
NOTES
- WebP wins.
- JPEG XL is second.
- JPEG XL is 6.56 percentage points better than PNG (smallest difference in the set).
- WebP is 20.15 percentage points better than PNG.
spacefun.png
![]()
The default wallpaper of Debian 6 (Squeeze). I exported it from SVG to PNG with Inkscape v1.4.0.
- Filename: spacefun.png
- Original size: 5,305,726 bytes
- Dimensions: 3840 × 2160 pixels
- Number of colors: 24,501
- Source: packages.debian.org/trixie/desktop-base
- Original filename: /usr/share/desktop-base/spacefun-theme/wallpaper/contents/images/3840x2160.svg
COMPRESSION RESULTS FOR spacefun.png
| Program and settings | Time | Size | Reduction |
|---|---|---|---|
| oxipng default | 7.958s | 3,267,873 | 38.41% |
oxipng --opt max | 11.882s | 3,270,858 | 38.35% |
oxipng --opt max --zopfli --fast | 430.480s | 3,240,291 | 38.93% |
oxipng --opt max --zopfli | 626.792s | 3,240,291 | 38.93% |
avifenc -l | 1.698s | 4,001,860 | 24.57% |
avifenc -l --speed 0 | 35.821s | 3,843,082 | 27.57% |
heif-enc -l | 1.445s | 3,657,341 | 31.07% |
heif-enc -l -p preset=veryslow | 1.483s | 3,655,625 | 31.10% |
cjxl -q 100 | 0.743s | 2,764,758 | 47.89% |
cjxl -q 100 --effort 9 | 2.345s | 2,633,595 | 50.36% |
cwebp -lossless -mt -exact… | 2.779s | 3,534,122 | 33.39% |
cwebp -lossless -mt -z 9 -exact… | 11.273s | 3,099,532 | 41.58% |
NOTES
- JPEG XL wins.
- WebP is second.
- JPEG XL is 11.43 percentage points better than PNG.
- WebP is 2.65 percentage points better than PNG (smallest difference in the set).
stripe.com.png
![]()
Screenshot of the Stripe homepage I took in Firefox on Windows 11 using the FireShot extension.
- Filename: stripe.com.png
- Original size: 401,189 bytes
- Dimensions: 1678 × 1274 pixels
- Number of colors: 63,894
- Original image: stripe.com.png
COMPRESSION RESULTS FOR stripe.com.png
| Program and settings | Time | Size | Reduction |
|---|---|---|---|
| oxipng default | 0.878s | 337,233 | 15.94% |
oxipng --opt max | 1.897s | 329,505 | 17.87% |
oxipng --opt max --zopfli --fast | 37.605s | 324,339 | 19.16% |
oxipng --opt max --zopfli | 73.949s | 324,339 | 19.16% |
avifenc -l | 2.235s | 452,910 | -12.89% |
avifenc -l --speed 0 | 32.892s | 411,104 | -2.47% |
heif-enc -l | 0.288s | 464,819 | -15.86% |
heif-enc -l -p preset=veryslow | 0.291s | 465,024 | -15.91% |
cjxl -q 100 | 0.911s | 261,444 | 34.83% |
cjxl -q 100 --effort 9 | 4.385s | 214,656 | 46.50% |
cwebp -lossless -mt -exact… | 0.461s | 272,116 | 32.17% |
cwebp -lossless -mt -z 9 -exact… | 2.967s | 263,618 | 34.29% |
NOTES
- JPEG XL wins.
- WebP is second.
- JPEG XL is 27.34 percentage points better than PNG.
- WebP is 15.13 percentage points better than PNG.
vitejs-logo.png
![]()
The logo of Vite, the frontend build tool.
- Filename: vitejs-logo.png
- Original size: 25,663 bytes
- Dimensions: 487 × 480 pixels
- Number of colors: 2,844
- Source: https://commons.wikimedia.org/wiki/File:Vitejs-logo.svg
- Original filename: 487px-Vitejs-logo.svg.png
COMPRESSION RESULTS FOR vitejs-logo.png
| Program and settings | Time | Size | Reduction |
|---|---|---|---|
| oxipng default | 0.088s | 22,433 | 12.59% |
oxipng --opt max | 0.398s | 22,064 | 14.02% |
oxipng --opt max --zopfli --fast | 3.966s | 21,467 | 16.35% |
oxipng --opt max --zopfli | 10.502s | 21,467 | 16.35% |
avifenc -l | 0.363s | 38,120 | -48.54% |
avifenc -l --speed 0 | 4.409s | 36,804 | -43.41% |
heif-enc -l | 0.126s | 39,168 | -52.62% |
heif-enc -l -p preset=veryslow | 0.126s | 39,176 | -52.66% |
cjxl -q 100 | 0.143s | 24,688 | 3.80% |
cjxl -q 100 --effort 9 | 0.644s | 18,088 | 29.52% |
cwebp -lossless -mt -exact… | 0.076s | 19,324 | 24.70% |
cwebp -lossless -mt -z 9 -exact… | 0.554s | 16,868 | 34.27% |
NOTES
- WebP wins.
- JPEG XL is second.
- JPEG XL is 13.17 percentage points better than PNG.
- WebP is 17.92 percentage points better than PNG.
wsl-logo.png
![]()
The logo of the Windows Subsystem for Linux (WSL).
- Filename: wsl-logo.png
- Original size: 19,038 bytes
- Dimensions: 256 × 256 pixels
- Number of colors: 1,623
- Source: github.com/microsoft/WSL/tree/master/Images
- Original filename: Square44x44Logo.targetsize-256
COMPRESSION RESULTS FOR wsl-logo.png
| Program and settings | Time | Size | Reduction |
|---|---|---|---|
| oxipng default | 0.072s | 17,906 | 5.95% |
oxipng --opt max | 0.155s | 17,018 | 10.61% |
oxipng --opt max --zopfli --fast | 2.280s | 16,655 | 12.52% |
oxipng --opt max --zopfli | 3.108s | 16,655 | 12.52% |
avifenc -l | 0.169s | 23,632 | -24.13% |
avifenc -l --speed 0 | 1.576s | 22,275 | -17.00% |
heif-enc -l | 0.094s | 24,683 | -29.65% |
heif-enc -l -p preset=veryslow | 0.095s | 24,507 | -28.73% |
cjxl -q 100 | 0.073s | 15,959 | 16.17% |
cjxl -q 100 --effort 9 | 0.322s | 14,011 | 26.41% |
cwebp -lossless -mt -exact… | 0.049s | 12,980 | 31.82% |
cwebp -lossless -mt -z 9 -exact… | 0.325s | 12,544 | 34.11% |
NOTES
- WebP wins.
- JPEG XL is second.
- JPEG XL is 13.89 percentage points better than PNG.
- WebP is 21.59 percentage points better than PNG.
General notes
One note:
Unless there is something wrong in the way I ran the tests, HEIF seems to be the inverse of PNG. It was designed for photographs and it struggles with what PNG is best at, lossless compression of graphics images.
Hardware, operating systems, and tools used in the tests
HARDWARE
- AMD Ryzen 7 5700G (8 cores, 16 threads, up to 4.67 GHz)
- 64 GB RAM (2×32 GB DDR4-3600, dual-channel)
- Samsung 970 EVO Plus NVMe SSD (ext4 partition on Linux, NTFS partition on Windows)
OPERATING SYSTEMS
- Debian 13 (Trixie), kernel 6.12.38
- Windows 11 PRO 26100.4946 (24H2)
COMPRESSION TOOLS
- avifenc 1.2.1 (version in Debian 13)
- cjxl 0.11.1 (version in Debian 13)
- cwebp 1.5.0 (version in Debian 13)
- heif-enc 1.19.8 (version in Debian 13)
- oxipng 9.1.5 (version in Debian 13)
— Demetris, 2025-10-15