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 to the smallest sizes you can get for PNG files? So I also compressed all test images with FileOptimizer for Windows. FileOptimizer runs images through a number of 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.

Full test results (more variations than in the tables below) are in a Google Sheets document: op111.net, 2025-09-11, oxipng and friends, compression results

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

The options used for the CLI tools are in the file with the hyperfine measurements: op111-20250911-oxipng-hyperfine-data.txt

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

The metadata the tools kept and removed in the various settings can be viewed in the pngcheck reports: op111-20250911-oxipng-pngcheck-data.zip.

The optipng and oxipng runs with the strongest settings include the additional option to strip metadata, in order to get the output size as small as possible. FileOptimizer strips metadata by default in all settings. See General notes at the end.

Do you have questions or corrections about the tests, or just want to say hi? Please use the contact form to send your message!

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 -o 7 -strip all32.800s1,112,05525.53%
oxipng default0.764s1,058,04629.14%
oxipng --opt max1.937s1,046,44629.92%
oxipng --opt max --zopfli --fast -s20.524s1,041,55230.25%
oxipng --opt max --zopfli -s28.896s1,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 -lossless0.533s828,99244.48%
cwebp -lossless -z 97.373s813,60645.51%

NOTES

  • oxipng --opt max --zopfli compresses the same with and without --fast.
  • oxipng best and FileOptimizer best are 0.05 percentage points apart.
  • No program stripped metadata in this image.

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 -o 7 -strip all52.045s464,44834.35%
oxipng default1.488s448,54436.60%
oxipng --opt max7.005s392,71044.49%
oxipng --opt max --zopfli --fast -s64.241s431,72338.98%
oxipng --opt max --zopfli -s162.742s382,36745.95%
FileOptimizer level 2 (fast)180.000s389,58044.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 -lossless0.860s328,60253.55%
cwebp -lossless -z 94.480s264,57062.60%

NOTES

  • optipng default and -o 7 compress the same (only difference is the metadata stripped).
  • oxipng --opt max --zopfli compresses more without --fast.
  • oxipng --opt max beats --opt max --zopfli --fast.
  • oxipng best and FileOptimizer best are 0.16 percentage points apart.
  • optipng -strip all strips 107 bytes of metadata in this image.
  • FileOptimizer and oxipng -s (--strip safe) strip 92 bytes of metadata in this image.

drought-map.png

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

Map showing drought conditions in Europe from the European Environment Agency.

COMPRESSION RESULTS FOR drought-map.png

Program and settingsTimeSizeReduction
optipng default2.555s646,10233.86%
optipng -o 7 -strip all24.281s646,08133.87%
oxipng default1.623s601,96538.38%
oxipng --opt max5.247s589,60239.65%
oxipng --opt max --zopfli --fast -s85.707s580,99340.53%
oxipng --opt max --zopfli -s110.950s580,99340.53%
FileOptimizer level 2 (fast)308.000s585,52940.06%
FileOptimizer level 5 (normal)417.000s580,98540.53%
FileOptimizer level 7 (good)473.000s580,68140.56%
FileOptimizer level 9 (best)1315.000s580,43940.58%
cwebp -lossless0.302s374,35661.68%
cwebp -lossless -z 96.437s369,06462.22%

NOTES

  • optipng default and -o 7 compress the same (only difference is the metadata stripped).
  • oxipng --opt max --zopfli compresses the same with and without --fast.
  • oxipng best and FileOptimizer best are 0.05 percentage points apart.
  • optipng -strip all strips 21 bytes of metadata in this image.
  • FileOptimizer and oxipng -s (--strip safe) strip no metadata in this image.

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: 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 settingsTimeSizeReduction
optipng default0.758s178,50733.77%
optipng -o 7 -strip all7.916s178,44533.79%
oxipng default0.310s169,02237.29%
oxipng --opt max0.904s167,59037.82%
oxipng --opt max --zopfli --fast -s21.438s162,97039.54%
oxipng --opt max --zopfli -s25.707s162,97039.54%
FileOptimizer level 2 (fast)88.000s163,49439.34%
FileOptimizer level 5 (normal)107.000s162,96839.54%
FileOptimizer level 7 (good)127.000s162,82539.53%
FileOptimizer level 9 (best)373.000s162,43839.73%
cwebp -lossless0.068s76,35871.67%
cwebp -lossless -z 91.958s70,08474.00%

NOTES

  • oxipng --opt max --zopfli compresses the same with and without --fast.
  • oxipng best and FileOptimizer best are 0.19 percentage points apart.
  • No program stripped metadata in this image.

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 -o 7 -strip all10.105s218,04533.01%
oxipng default0.605s201,05538.23%
oxipng --opt max1.421s193,23540.63%
oxipng --opt max --zopfli --fast -s32.439s189,05941.92%
oxipng --opt max --zopfli -s39.578s189,05941.92%
FileOptimizer level 2 (fast)104.000s191,91441.04%
FileOptimizer level 5 (normal)134.000s189,03641.92%
FileOptimizer level 7 (good)152.000s189,03641.92%
FileOptimizer level 9 (best)535.000s188,22042.17%
cwebp -lossless0.090s89,14272.61%
cwebp -lossless -z 93.227s88,02272.96%

NOTES

  • optipng default and -o 7 compress the same.
  • oxipng --opt max --zopfli compresses the same with and without --fast.
  • oxipng best and FileOptimizer best are 0.25 percentage points apart.
  • No program stripped metadata in this image.

html5-logo.png

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

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 settingsTimeSizeReduction
optipng default0.064s4,78044.17%
optipng -o 7 -strip all0.621s4,74344.60%
oxipng default0.052s5,14739.89%
oxipng --opt max0.191s4,42948.27%
oxipng --opt max --zopfli --fast -s2.046s4,23650.53%
oxipng --opt max --zopfli -s3.448s4,09452.18%
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 -lossless0.015s3,41660.10%
cwebp -lossless -z 90.834s3,46059.59%

NOTES

  • optipng default and -o 7 compress the same (the difference is the metadata stripped by -strip all).
  • optipng default beats oxipng default.
  • oxipng --opt max --zopfli compresses more without --fast.
  • oxipng best and FileOptimizer best are 0.21 percentage points apart.
  • cwebp -z 6 (default) beats -z 9.
  • FileOptimizer, optipng -strip all and oxipng -s (--strip safe) strip 37 bytes of metadata in this image.

mediawiki-logo.png

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

The MediaWiki logo.

COMPRESSION RESULTS FOR mediawiki-logo.png

Program and settingsTimeSizeReduction
optipng default0.148s25,9419.47%
optipng -o 7 -strip all2.027s25,74610.15%
oxipng default0.046s24,63214.04%
oxipng --opt max0.171s24,66413.93%
oxipng --opt max --zopfli --fast -s1.376s24,01616.19%
oxipng --opt max --zopfli -s2.817s24,01616.19%
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 -lossless0.058s19,83030.80%
cwebp -lossless -z 90.611s17,91837.47%

NOTES

  • optipng default and -o 7 compress the same (only difference is the metadata stripped).
  • oxipng default beats --opt max. This is not an error.
  • oxipng --opt max --zopfli compresses the same with and without --fast.
  • oxipng best and FileOptimizer best are 0.45 percentage points apart.
  • FileOptimizer, optipng -strip all and oxipng -s (--strip safe) strip 195 bytes of metadata in this image.

powertoys.png

Thumbnail of the powertoys.png image used in the test

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 settingsTimeSizeReduction
optipng default0.960s230,3255.85%
optipng -o 7 -strip all11.832s229,6406.13%
oxipng default0.266s201,53317.62%
oxipng --opt max0.725s198,00819.06%
oxipng --opt max --zopfli --fast -s8.669s194,46320.51%
oxipng --opt max --zopfli -s14.980s194,46320.51%
FileOptimizer level 2 (fast)60.000s196,58519.64%
FileOptimizer level 5 (normal)66.000s194,42320.52%
FileOptimizer level 7 (good)76.000s194,17820.62%
FileOptimizer level 9 (best)185.000s193,74820.80%
cwebp -lossless0.178s144,24641.04%
cwebp -lossless -z 91.703s140,09042.73%

NOTES

  • oxipng --opt max --zopfli compresses the same with and without --fast.
  • oxipng best and FileOptimizer best are 0.29 percentage points apart.
  • optipng -strip all strips 280 bytes of metadata in this image.
  • oxipng -s (--strip safe) strips 246 bytes of metadata in this image.
  • FileOptimizer strips 259 bytes of metadata in this image.

pschmidt.png

Thumbnail of the pschmidt.png image used in the test

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 -o 7 -strip all32.032s59,4570.66%
oxipng default1.411s59,8400.02%
oxipng --opt max2.770s57,7573.50%
oxipng --opt max --zopfli --fast -s311.166s55,9896.45%
oxipng --opt max --zopfli -s405.053s55,9896.45%
FileOptimizer level 2 (fast)278.000s55,8256.73%
FileOptimizer level 5 (normal)790.000s55,7466.86%
FileOptimizer level 7 (good)1159.000s55,6916.95%
FileOptimizer level 9 (best)6574.000s55,3627.50%
cwebp -lossless1.549s7,42087.60%
cwebp -lossless -z 96.965s5,51690.78%

NOTES

  • optipng default beats oxipng default.
  • oxipng --opt max --zopfli compresses the same with and without --fast.
  • oxipng best and FileOptimizer best are 1.05 percentage points apart.
  • The cwebp numbers are not errors.
  • No program stripped metadata in this image.

radar-chart.png

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

Sample radar chart from the Chart.js documentation.

COMPRESSION RESULTS FOR radar-chart.png

Program and settingsTimeSizeReduction
optipng default0.543s75,91837.61%
optipng -o 7 -strip all5.939s75,91837.61%
oxipng default0.283s73,40239.68%
oxipng --opt max1.008s71,48441.25%
oxipng --opt max --zopfli --fast -s11.592s68,92743.36%
oxipng --opt max --zopfli -s19.313s68,92743.36%
FileOptimizer level 2 (fast)53.000s69,14843.18%
FileOptimizer level 5 (normal)54.000s68,92443.36%
FileOptimizer level 7 (good)70.000s68,92443.36%
FileOptimizer level 9 (best)248.000s68,88743.39%
cwebp -lossless0.182s58,39452.01%
cwebp -lossless -z 91.665s44,40863.51%

NOTES

  • optipng default and -o 7 compress the same.
  • oxipng --opt max --zopfli compresses the same with and without --fast.
  • oxipng best and FileOptimizer best are 0.03 percentage points apart.
  • No program stripped metadata in this image.

spacefun.png

Thumbnail of the spacefun.png image used in the test

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 settingsTimeSizeReduction
optipng default66.750s4,389,22417.27%
optipng -o 7 -strip all645.563s3,586,34632.41%
oxipng default7.958s3,267,87338.41%
oxipng --opt max11.882s3,270,85838.35%
oxipng --opt max --zopfli --fast -s432.944s3,240,25438.93%
oxipng --opt max --zopfli -s636.815s3,240,25438.93%
FileOptimizer level 2 (fast)1156.000s3,316,61337.49%
FileOptimizer level 5 (normal)1470.000s3,240,59238.92%
FileOptimizer level 7 (good)1851.000s3,240,59238.92%
FileOptimizer level 9 (best)2984.000s3,234,11639.04%
cwebp -lossless2.778s3,534,12233.39%
cwebp -lossless -z 921.414s3,099,53241.58%

NOTES

  • oxipng default beats --opt max. This is not an error.
  • oxipng --opt max --zopfli compresses the same with and without --fast.
  • oxipng best and FileOptimizer best are 0.11 percentage points apart.
  • optipng -strip all strips 58 bytes of metadata in this image.
  • FileOptimizer and oxipng -s (--strip safe) strip 37 bytes of metadata in this image.

stripe.com.png

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

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 settingsTimeSizeReduction
optipng default3.449s387,7523.35%
optipng -o 7 -strip all44.269s374,4146.67%
oxipng default0.878s337,23315.94%
oxipng --opt max1.897s329,50517.87%
oxipng --opt max --zopfli --fast -s37.574s324,33919.16%
oxipng --opt max --zopfli -s73.162s324,33919.16%
FileOptimizer level 2 (fast)141.000s326,56118.60%
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 -lossless0.462s272,11632.17%
cwebp -lossless -z 95.542s263,61834.29%

NOTES

  • oxipng --opt max --zopfli compresses the same with and without --fast.
  • oxipng best and FileOptimizer best are 0.72 percentage points apart.
  • No program stripped metadata in this image.

vitejs-logo.png

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

The logo of Vite, the frontend build tool.

COMPRESSION RESULTS FOR vitejs-logo.png

Program and settingsTimeSizeReduction
optipng default0.147s22,75011.35%
optipng -o 7 -strip all2.185s22,55512.11%
oxipng default0.088s22,43312.59%
oxipng --opt max0.402s22,06414.02%
oxipng --opt max --zopfli --fast -s3.962s21,27217.11%
oxipng --opt max --zopfli -s10.676s21,27217.11%
FileOptimizer level 2 (fast)25.000s20,40820.48%
FileOptimizer level 5 (normal)27.000s20,17521.38%
FileOptimizer level 7 (good)36.000s20,16721.42%
FileOptimizer level 9 (best)198.000s20,09421.70%
cwebp -lossless0.075s19,32424.70%
cwebp -lossless -z 91.042s16,86834.27%

NOTES

  • optipng default and -o 7 compress the same (only difference is the metadata stripped).
  • oxipng --opt max --zopfli compresses the same with and without --fast.
  • oxipng best and FileOptimizer best are 4.59 percentage points apart. Adding --alpha to oxipng --opt max --zopfli -s gives 20,152 bytes, which is 21.47% reduction and 0.25 points from FileOptimizer. Note that FileOptimizer runs oxipng with --alpha in all settings.
  • FileOptimizer, optipng -strip all and oxipng -s (--strip safe) strip 195 bytes of metadata in this image.

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 (but not with --opt max --zopfli --fast).

wsl-logo.png

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

The logo of the Windows Subsystem for Linux (WSL).

COMPRESSION RESULTS FOR wsl-logo.png

Program and settingsTimeSizeReduction
optipng default0.119s19,0380.00%
optipng -o 7 -strip all1.935s19,0380.00%
oxipng default0.072s17,9065.95%
oxipng --opt max0.155s17,01810.61%
oxipng --opt max --zopfli --fast -s2.268s16,65512.52%
oxipng --opt max --zopfli -s3.175s16,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 -lossless0.049s12,98031.82%
cwebp -lossless -z 90.597s12,54434.11%

NOTES

  • It seems the original was already optimized, probably with optipng.
  • oxipng --opt max --zopfli compresses the same with and without --fast.
  • oxipng best and FileOptimizer best are 1.66 percentage points apart. Adding --alpha to oxipng --opt max --zopfli -s gives 16,535 bytes, which is 13.15% reduction and 1.03 points from FileOptimizer. See above about using --alpha.
  • No program stripped metadata in this image.

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

General notes

The full settings for cwebp were -lossless -exact -metadata all, with and without -z 9. -exact preserves RGB values in transparent areas. -metadata all copies all metadata to the output.

You can view all options for the CLI tools in the file with the hyperfine measurements: op111-20250911-oxipng-hyperfine-data.txt

In FileOptimizer the Copy metadata option for PNG files was always checked.

FileOptimizer always strips some metadata, even when the Copy metadata option is selected, at least the same amount as oxipng with --strip safe: When Copy metadata is selected, FileOptimizer runs oxipng with --strip safe. When it is not selected, it runs oxipng with --strip all.

Another difference is that FileOptimizer always runs oxipng with the --alpha option.

optipng has only one option for stripping metadata: -strip all.

Note that the --strip safe (and its -s shortcut) option in oxipng and -strip all in optipng do not remove metadata needed for the proper rendering of the image, but they may remove metadata you want to keep: e.g., software program used to make the image, who made the image, when the image was last modified, etc.

You can view the metadata the three tools (optipng, oxipng, and FileOptimizer) kept and removed in their various settings in the pngcheck reports: op111-20250911-oxipng-pngcheck-data.zip

Hardware, operating systems, and tools used in the tests

HARDWARE

  • AMD Ryzen 7 5700G (8 cores, 16 threads)
  • 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

Changelog

  • 2025-10-04
    • Corrected wrong original size, and reduction percentages, for github.com-repo.png.
    • Corrected other smaller inaccuracies.
    • Added link to Google Sheets document.
  • 2025-09-16