Compare formats on your own image

Compare formats encodes one image in every format this browser can write — WebP, PNG, JPEG, AVIF, GIF, BMP, QOI, TGA and PPM — and reports the file size, the encode time and, for the lossy ones, a curve of size against quality. JPEG, WebP and AVIF are each measured at five quality points: 0.5, 0.7, 0.8, 0.9 and 1.0. The encoding happens in your own tab, so the answer is about your image on your machine rather than general advice about images.

How it works

  1. Drop an image Measuring starts as soon as the image decodes. The formats are encoded one at a time on purpose — concurrent encodes would compete for the same cores and give every timing a worse number than it deserves.
  2. Leave the reduced test on for the first pass It encodes a 1200px render instead of the full image, which turns minutes into seconds. The formats keep their order and roughly their ratios at full size; the byte counts do not. Turn it off when you want the bytes you would actually ship.
  3. Read the table Each row gives the size, the share of the original (or of PNG, when the test was reduced), the encode time and the curve. Rows sort smallest first once the run finishes, and the smallest is marked.
  4. Move the reading point along the curve Read the curve at 0.5, 0.7, 0.8, 0.9 or 1.0. Every point was already measured, so moving it re-reads the run and re-encodes nothing. Which format wins can change with the quality, and that is the point.
  5. Select a row and download it Selecting a row shows it in a split view against a lossless render of the same pixels, so the size is set beside what it cost. Download saves the exact file that was measured.

Questions

Why is AVIF missing from my table?
AVIF encoding needs a Chromium browser — Chrome, Edge, Brave or Arc. Firefox and Safari can display AVIF but cannot write it, and file4edit has no server to fall back on, so AVIF is listed under "not measured" with that reason instead of being quietly dropped.
Why are ICO, ICNS, PGM and PBM skipped?
Because their sizes would answer a different question. ICO and ICNS are containers holding a set of icons rather than an encoding of your picture, and PGM and PBM discard colour, so all four would come out small for a reason that is not compression. Each is shown in a "not measured" list with its reason.
How exact are the encode times?
They are wall-clock times taken in this tab and they include preparing the pixels for the codec, so they move between runs and between machines. Use them to rank the formats against each other within one run, not as an absolute benchmark.

Every tool