Optimization

PNG vs JPG vs WebP: Which Image Format Should You Use?

Three formats cover 95% of images on the web. Picking the right one is worth more than any amount of compression tuning afterwards — the wrong format can double your file size before you've touched a quality slider.

The 30-second answer

  • Photograph? → JPG (or WebP, ~25% smaller).
  • Screenshot, logo, UI, chart? → PNG (or lossless WebP).
  • Needs transparency? → PNG or WebP. Never JPG.
  • Want the smallest file and control both ends? → WebP.

PNG — the pixel-perfect one

PNG is lossless and supports full alpha transparency. Sharp edges, text and flat color compress beautifully; photographs compress terribly (a photo saved as PNG is often 5–10× larger than the same photo as JPG). Its superpower is palette quantization: mapping an image to ≤256 well-chosen colors keeps it looking identical for most graphics while slashing the size.

Use for: screenshots, logos, icons, diagrams, anything with transparency.
Avoid for: photos.

JPG — the photography workhorse

JPG was engineered for continuous-tone photographs and it is still excellent at exactly that. It has no transparency and it damages sharp edges — text on a JPG screenshot grows fuzzy halos. Quality 80 is the classic sweet spot.

Use for: photos, complex gradients, anything camera-shaped.
Avoid for: text, UI, transparency.

WebP — the modern all-rounder

WebP does both jobs: lossy mode beats JPG by roughly 25% at equal quality, lossless mode beats PNG by roughly 25%, and both support transparency. Browser support has been universal since 2020 — every current browser renders it. The only reasons to skip it are legacy email clients and some older native apps.

Real numbers

The same 1920×1080 assets, compressed sensibly in FreeCompressor:

ImagePNGJPG (q80)WebP (q80)
Landscape photo2.9 MB310 KB235 KB
App screenshot148 KB290 KB119 KB
Logo with transparency24 KBn/a14 KB

Note the reversal: the photo is 10× smaller as JPG, the screenshot is 2× smaller as PNG. Format choice depends on content, not preference.

What about GIF, AVIF and HEIC?

GIF is obsolete for static images (256 colors, huge files) — convert to PNG or WebP. AVIF compresses even harder than WebP and is now widely supported, but encoders are slow. HEIC is what iPhones shoot; convert it to JPG or WebP before putting it on the web.

Convert in one step

FreeCompressor's image compressor converts between PNG, JPG and WebP in any direction while compressing — drop a file, pick an output format and compare the result side by side, all without uploading anything.