You are viewing this site in a simplified layout because your browser does not yet support CSS Subgrid.

op111.net

Search op111.net

oxipng and friends: A comparison of PNG optimization tools

When I first heard of oxipng some years ago I thought it was a faster optipng. I ran a few tests recently and saw that oxipng is indeed very fast but it also compresses much better than optipng in most cases.

This made me curious: How close was oxipng then to the smallest sizes you can get for PNG files? So I compressed all test images with FileOptimizer for Windows. FileOptimizer runs images through six different tools (including oxipng) in sequence, in order to achieve the smallest possible size. It takes its time, but it does give you the smallest possible size for each PNG image.

I was surprised to see that oxipng was close to the results FileOptimizer achieved.

I then had to know something else: I knew that WebP, a more modern format, is better, but how much better? So I converted all the test PNG images losslessly to WebP using cwebp.

The results are presented in the tables below.

For the hardware, operating systems, and versions used, see section at the bottom.

The commands and results for the CLI tools were tracked with hyperfine: op111-20250911-oxipng-hyperfine-data.txt.

The FileOptimizer results were tracked with screenshots: op111-20250911-oxipng-fileoptimizer-data.zip.

You have questions, corrections, or just want to say hi? Please use the contact form.

d3js.org.png

Thumbnail of the d3js.org.png image used in the test

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 settingsTimeSizeReduction
optipng default2.638s1,113,70625.42%
optipng -o732.903s1,112,05525.53%
oxipng default0.764s1,058,04629.14%
oxipng --opt max1.937s1,046,44629.92%
oxipng --opt max --zopfli --fast20.504s1,041,55230.25%
oxipng --opt max --zopfli28.986s1,041,55230.25%
FileOptimizer level 2 (fast)97.000s1,046,85629.89%
FileOptimizer level 5 (normal)116.000s1,041,33630.26%
FileOptimizer level 7 (good)161.000s1,041,33630.26%
FileOptimizer level 9 (best)380.000s1,040,84030.30%
cwebp (lossless) default0.533s828,99244.48%
cwebp (lossless) -z97.373s813,60645.51%

NOTES

  • oxipng --opt max --zopfli gives the same size with and without --fast.
  • oxipng best and FileOptimizer best are 0.01 percentage points apart.

debian-desktop.png

Thumbnail of the debian-desktop.png image used in the test

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 settingsTimeSizeReduction
optipng default3.096s464,55534.34%
optipng -o752.281s464,55534.34%
oxipng default1.488s448,54436.60%
oxipng --opt max7.005s392,71044.49%
oxipng --opt max --zopfli --fast64.088s431,81538.96%
oxipng --opt max --zopfli156.336s382,45945.94%
FileOptimizer level 2 (fast)180.225s389,59044.93%
FileOptimizer level 5 (normal)310.000s383,52845.79%
FileOptimizer level 7 (good)396.000s381,89646.02%
FileOptimizer level 9 (best)1343.000s381,24546.11%
cwebp (lossless) default0.860s328,60253.55%
cwebp (lossless) -z94.480s264,57062.60%

NOTES

  • optipng default and -o7 give the same size.
  • oxipng --opt max --zopfli without --fast reduces the size a lot more.
  • oxipng best and FileOptimizer best are 0.17 percentage points apart.
  • A case where oxipng --opt max --zopfli reduces more without --fast.

drought-map.png

Thumbnail of the drought-map.png image used in the test

COMPRESSION RESULTS FOR drought-map.png

Program and settingsTimeSizeReduction
optipng default2.555s646,10233.84%
optipng -o724.141s646,10233.84%
oxipng default1.623s601,96538.38%
oxipng --opt max5.247s589,60239.63%
oxipng --opt max --zopfli --fast85.481s580,99340.52%
oxipng --opt max --zopfli109.564s580,99340.52%
FileOptimizer level 2 (fast)308.000s585,52940.05%
FileOptimizer level 5 (normal)417.000s580,98540.52%
FileOptimizer level 7 (good)473.000s580,68140.55%
FileOptimizer level 9 (best)1315.000s580,43940.58%
cwebp (lossless) default0.302s374,35661.68%
cwebp (lossless) -z96.437s369,06462.22%

NOTES

  • optipng default and -o7 give the same size.
  • oxipng --opt max --zopfli gives the same size with and without --fast.
  • oxipng best and FileOptimizer best are 0.06 percentage points apart.

github.com-repo.png

Thumbnail of the github.com-repo.png image used in the test

Screenshot of the oxipng repo on GitHub I took in Chrome on Debian using the FireShot extension.

  • Filename: github.com-repo.png
  • Original size: 270,336 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 settingsTimeSizeReduction
optipng default0.758s178,50733.97%
optipng -o77.945s178,44533.99%
oxipng default0.310s169,02237.48%
oxipng --opt max0.913s167,59038.01%
oxipng --opt max --zopfli --fast21.438s162,97039.72%
oxipng --opt max --zopfli25.154s162,97039.72%
FileOptimizer level 2 (fast)88.000s163,49439.53%
FileOptimizer level 5 (normal)107.000s162,96839.72%
FileOptimizer level 7 (good)127.000s162,82539.77%
FileOptimizer level 9 (best)373.000s162,43839.91%
cwebp (lossless) default0.068s76,35871.75%
cwebp (lossless) -z91.958s70,08474.08%

NOTES

  • oxipng --opt max --zopfli gives the same size with and without --fast.

goaccess.io-demo.png

Thumbnail of the goaccess.io-demo.png image used in the test

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 settingsTimeSizeReduction
optipng default0.984s218,04533.01%
optipng -o710.085s218,04533.01%
oxipng default0.605s201,05538.23%
oxipng --opt max1.421s193,23540.63%
oxipng --opt max --zopfli --fast32.375s189,05941.92%
oxipng --opt max --zopfli41.427s189,05941.92%
FileOptimizer level 2 (fast)104.000s191,91441.03%
FileOptimizer level 5 (normal)134.000s189,03641.93%
FileOptimizer level 7 (good)152.000s189,03641.93%
FileOptimizer level 9 (best)535.000s188,22042.17%
cwebp (lossless) default0.090s89,14272.61%
cwebp (lossless) -z93.227s88,02272.96%

NOTES

  • optipng default and -o7 give the same size.
  • oxipng --opt max --zopfli gives the same size with and without --fast.
  • oxipng best and FileOptimizer best are 0.25 percentage points apart.

html5-logo.png

Thumbnail of the html5-logo.png image used in the test

  • 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 settingsTimeSizeReduction
optipng default0.064s4,78044.17%
optipng -o70.620s4,78044.17%
oxipng default0.052s5,14739.89%
oxipng --opt max0.191s4,42948.27%
oxipng --opt max --zopfli --fast2.046s4,27350.09%
oxipng --opt max --zopfli3.528s4,13151.75%
FileOptimizer level 2 (fast)54.000s4,09152.22%
FileOptimizer level 5 (normal)54.000s4,09152.22%
FileOptimizer level 7 (good)59.000s4,08552.29%
FileOptimizer level 9 (best)131.000s4,07652.39%
cwebp (lossless) default0.015s3,41660.10%
cwebp (lossless) -z90.834s3,46059.59%

NOTES

  • optipng default beats oxipng default.
  • cwebp default beats -z9.
  • A case where oxipng --opt max --zopfli reduces more without --fast.

mediawiki-logo.png

Thumbnail of the mediawiki-logo.png image used in the test

COMPRESSION RESULTS FOR mediawiki-logo.png

Program and settingsTimeSizeReduction
optipng default0.148s25,9419.47%
optipng -o72.028s25,9419.47%
oxipng default0.046s24,63214.04%
oxipng --opt max0.171s24,66413.93%
oxipng --opt max --zopfli --fast1.363s24,21115.51%
oxipng --opt max --zopfli2.816s24,21115.51%
FileOptimizer level 2 (fast)31.000s24,27015.31%
FileOptimizer level 5 (normal)19.000s24,01216.21%
FileOptimizer level 7 (good)21.000s23,96616.37%
FileOptimizer level 9 (best)62.000s23,88816.64%
cwebp (lossless) default0.058s19,83030.80%
cwebp (lossless) -z90.611s17,91837.47%

NOTES

  • optipng default and -o7 give the same size.
  • oxipng default beats --opt max. This is not an error.
  • oxipng --opt max --zopfli gives the same size with and without --fast.

powertoys.png

Thumbnail of the powertoys.png image used in the test

Screenshot of the Windows 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 settingsTimeSizeReduction
optipng default0.960s230,3255.85%
optipng -o711.871s229,9206.01%
oxipng default0.266s201,53317.62%
oxipng --opt max0.725s198,00819.06%
oxipng --opt max --zopfli --fast8.663s194,70920.41%
oxipng --opt max --zopfli13.882s194,70920.41%
FileOptimizer level 2 (fast)60.000s196,58519.63%
FileOptimizer level 5 (normal)66.000s194,42320.56%
FileOptimizer level 7 (good)76.000s194,17820.62%
FileOptimizer level 9 (best)185.000s193,74820.80%
cwebp (lossless) default0.178s144,24641.04%
cwebp (lossless) -z91.703s140,09042.73%

NOTES

  • oxipng --opt max --zopfli gives the same size with and without --fast.

pschmidt.png

Thumbnail of the pschmidt.png image used in the test

A 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).

COMPRESSION RESULTS FOR pschmidt.png

Program and settingsTimeSizeReduction
optipng default2.509s59,5910.44%
optipng -o732.161s59,4570.66%
oxipng default1.411s59,8400.02%
oxipng --opt max2.770s57,7573.50%
oxipng --opt max --zopfli --fast309.241s55,9896.45%
oxipng --opt max --zopfli408.220s55,9896.45%
FileOptimizer level 2 (fast)278.000s55,8256.72%
FileOptimizer level 5 (normal)790.000s55,7466.85%
FileOptimizer level 7 (good)1159.000s55,6916.94%
FileOptimizer level 9 (best)6574.000s55,3627.49%
cwebp (lossless) default1.549s7,42087.60%
cwebp (lossless) -z96.965s5,51690.78%

NOTES

  • optipng default beats oxipng default.
  • oxipng --opt max --zopfli gives the same size with and without --fast.

radar-chart.png

Thumbnail of the radar-chart.png image used in the test

COMPRESSION RESULTS FOR radar-chart.png

Program and settingsTimeSizeReduction
optipng default0.543s75,91837.63%
optipng -o75.952s75,91837.63%
oxipng default0.283s73,40239.69%
oxipng --opt max1.008s71,48441.26%
oxipng --opt max --zopfli --fast11.468s68,92743.36%
oxipng --opt max --zopfli19.364s68,92743.36%
FileOptimizer level 2 (fast)53.000s69,14843.18%
FileOptimizer level 5 (normal)54.000s68,92443.37%
FileOptimizer level 7 (good)70.000s68,92443.37%
FileOptimizer level 9 (best)248.000s68,88743.40%
cwebp (lossless) default0.182s58,39452.01%
cwebp (lossless) -z91.665s44,40863.51%

NOTES

  • optipng default and -o7 give the same size.
  • oxipng --opt max --zopfli gives the same size with and without --fast.
  • oxipng best and FileOptimizer best are 0.04 percentage points apart.

spacefun.png

Thumbnail of the spacefun.png image used in the test

The default wallpaper of Debian 6 (Squeeze). Current Debian has it in SVG format. I exported it to PNG with GIMP v3.0.4.

  • 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 settingsTimeSizeReduction
optipng default66.750s4,389,22417.26%
optipng -o7634.668s3,586,40432.40%
oxipng default7.958s3,267,87338.40%
oxipng --opt max11.882s3,270,85838.34%
oxipng --opt max --zopfli --fast430.480s3,240,29138.92%
oxipng --opt max --zopfli626.792s3,240,29138.92%
FileOptimizer level 2 (fast)1156.000s3,316,61337.49%
FileOptimizer level 5 (normal)1470.000s3,240,59238.91%
FileOptimizer level 7 (good)1851.000s3,240,59238.91%
FileOptimizer level 9 (best)2984.000s3,234,11639.03%
cwebp (lossless) default2.778s3,534,12233.39%
cwebp (lossless) -z921.414s3,099,53241.58%

NOTES

  • oxipng default beats --opt max. This is not an error.
  • oxipng --opt max --zopfli gives the same size with and without --fast.
  • oxipng best and FileOptimizer best are 0.11 percentage points apart.

stripe.com.png

Thumbnail of the stripe.com.png image used in the test

Screenshot of the Stripe homepage taken 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 settingsTimeSizeReduction
optipng default3.449s387,7523.35%
optipng -o743.773s374,4146.67%
oxipng default0.878s337,23315.94%
oxipng --opt max1.897s329,50517.87%
oxipng --opt max --zopfli --fast37.605s324,33919.16%
oxipng --opt max --zopfli73.949s324,33919.16%
FileOptimizer level 2 (fast)141.000s326,56118.61%
FileOptimizer level 5 (normal)165.000s323,58419.34%
FileOptimizer level 7 (good)206.000s322,12319.71%
FileOptimizer level 9 (best)478.000s321,43719.88%
cwebp (lossless) default0.462s272,11632.17%
cwebp (lossless) -z95.542s263,61834.29%

NOTES

  • oxipng --opt max --zopfli gives the same size with and without --fast.

vitejs-logo.png

Thumbnail of the vitejs-logo.png image used in the test

COMPRESSION RESULTS FOR vitejs-logo.png

Program and settingsTimeSizeReduction
optipng default0.147s22,75011.35%
optipng -o72.175s22,75011.35%
oxipng default0.088s22,43312.59%
oxipng --opt max0.405s22,06414.02%
oxipng --opt max --zopfli --fast3.975s21,46716.35%
oxipng --opt max --zopfli10.469s21,46716.35%
FileOptimizer level 2 (fast)25.000s20,40820.48%
FileOptimizer level 5 (normal)27.000s20,17521.39%
FileOptimizer level 7 (good)36.000s20,16721.42%
FileOptimizer level 9 (best)198.000s20,09421.71%
cwebp (lossless) default0.075s19,32424.70%
cwebp (lossless) -z91.042s16,86834.27%

NOTES

  • oxipng --opt max --zopfli gives the same size with and without --fast.
  • oxipng and FileOptimizer are 5.36 percentage points apart, which must have something to do with how the tools in FileOptimizer handle the alpha channel. Using --alpha in oxipng brings the size down to 20,347 bytes (20.71% reduction).

THE ALPHA CHANNEL

oxipng says this about using --alpha:

--alpha can improve compression of images with transparency, by altering the color values of fully transparent pixels. This is generally recommended, but take care as this is technically a lossy transformation and may be unsuitable for some specific applications.”

In my tests for this image --alpha improved the size in two of the four configurations:

  • When used with --opt max.
  • When used with --opt max --zopfli.

wsl-logo.png

Thumbnail of the wsl-logo.png image used in the test

The official WSL logo.

COMPRESSION RESULTS FOR wsl-logo.png

Program and settingsTimeSizeReduction
optipng default0.119s19,0380.00%
optipng -o71.930s19,0380.00%
oxipng default0.073s17,9065.95%
oxipng --opt max0.161s17,01810.61%
oxipng --opt max --zopfli --fast2.275s16,65512.52%
oxipng --opt max --zopfli3.163s16,65512.52%
FileOptimizer level 2 (fast)35.000s16,61512.73%
FileOptimizer level 5 (normal)30.000s16,41213.79%
FileOptimizer level 7 (good)34.000s16,39413.89%
FileOptimizer level 9 (best)73.000s16,33814.18%
cwebp (lossless) default0.049s12,98031.82%
cwebp (lossless) -z90.597s12,54434.11%

NOTES

  • It seems this image was already optimized, probably with optipng.
  • oxipng --opt max --zopfli gives the same size with and without --fast.
  • oxipng best with --alpha is 16,535 bytes (13.15% reduction). See above about using --alpha.

In my tests for this image --alpha improved the size in all four oxipng configurations.

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

— Demetris, 2025-09-11