toolsmith

No upload · everything runs in your browser

PNG, JPG, WebP or AVIF — which should you use?

Four formats, one question that settles most of it: is the image a photograph, or is it flat colour, text and lines?

Updated

The question that decides it

Photographs are made of gradual, noisy variation. Lossy formats — JPG, WebP, AVIF — are built for exactly that, and they get small by throwing away detail your eye does not track.

Screenshots, logos, diagrams and anything with text are the opposite: large flat areas and hard edges. Lossy compression puts visible fuzz around the edges of letters, and because there is little noise to discard it does not even save much. That is what PNG is for.

JPG — the one that opens everywhere

Thirty years old, understood by everything ever built, and still perfectly good for photographs. It cannot store transparency, and it will show blocky artefacts if you push quality far down.

Pick it when the file has to be opened by software you do not control — a printer, a government upload form, a colleague's ancient laptop.

PNG — lossless, transparent, and wrong for photos

PNG never discards a pixel, and it supports full transparency. That makes it right for logos, screenshots, icons and anything you will edit again later.

It is a bad container for a photograph, and this is where people get stuck: running a photographic PNG through a compressor barely helps. Lossless compression has almost nothing to remove from photographic noise. If your PNG photo is 8 MB, no PNG optimiser will make it small — converting it to JPG or WebP will.

WebP — the sensible default for the web

WebP does both jobs: lossy for photos, lossless with transparency for graphics, plus animation. At comparable quality it typically lands 25–35% below JPEG.

Every current browser displays it. The remaining reason to avoid it is software outside the browser — some older desktop apps and print workflows still will not open a .webp.

AVIF — smallest, slowest, and not everywhere yet

AVIF uses the AV1 video codec and is usually the smallest of the four at a given quality, particularly on photographs and at low bitrates. Encoding is slow — noticeably so for a large batch.

There is a trap worth knowing: a browser being able to display AVIF does not mean it can create one. Encoding support is narrower than decoding support, and a browser asked to write a format it does not support will quietly hand back a PNG instead. That is why our converter builds its format list by encoding a test image and checking what actually came back, rather than by trusting a support table.

Short version

If you want a rule of thumb rather than a decision tree:

  • Photo going on a website → WebP, or AVIF if size matters more than encoding time.
  • Photo that has to open anywhere → JPG.
  • Screenshot, logo, diagram, anything with text → PNG.
  • Needs transparency → PNG or WebP. Never JPG.
  • Already a JPG and just too big → resize the pixel dimensions first. Halving the width quarters the pixel count, and that beats any quality slider.

Do it now, without uploading anything

Does converting PNG to JPG make it smaller?

For a photograph, dramatically — often by 80% or more. For a screenshot or a logo it can make it larger and will blur the text edges. Check what the image actually is before converting.

Is WebP safe to use now?

In a browser, yes — every current browser displays it. Outside the browser it is patchier, so if the file is going to a print shop or into a desktop application, JPG or PNG is the safer hand-off.

Why is my compressed PNG the same size?

Because PNG compression is lossless and photographic detail is nearly incompressible. There is nothing safe left to remove. Change the format or reduce the pixel dimensions instead.

Worth reading