KeepLocalHubGet the app
Explore more

Home / Learn

Module 1: Image formats and compressionLesson 2 of 255 min read

JPG, PNG, WebP or AVIF: which image format to use

Most of the time the format of an image is decided for you: the camera saves JPG, a screenshot comes out as PNG. But when you save a picture for a website, an email or a document, the choice changes how big the file is, how sharp the text looks and whether a transparent background survives. This guide compares the four formats you'll meet most and ends with a short decision guide.

Lossy and lossless: the main difference

Lossless compression stores every pixel exactly as it was, just more compactly. Open the file again and you get back the same picture, pixel for pixel. Lossy compression throws away detail the eye is unlikely to notice, which makes files much smaller but means the original can't be recovered.

Which one suits a picture depends on its content. Photos and other images with smooth gradients tolerate lossy compression well, because the discarded detail is hard to see. Screenshots, diagrams, logos and line art don't: blurring and coloured fringes around text and sharp edges are very visible.

  • JPG: lossy only.
  • PNG: lossless.
  • WebP: either lossy or lossless, chosen when the file is saved.
  • AVIF: either lossy or lossless.

Transparency and animation

Transparency means some pixels are see-through, such as the area around a logo placed on a coloured page. JPG has no transparency at all. PNG, WebP and AVIF all support it, with smooth, partial transparency rather than only on or off.

When you convert a transparent image to JPG, the transparent parts have to become a colour. The converter fills them with the colour set in Background for transparent parts, white unless you change it. Convert to PNG, WebP or AVIF instead and the transparency is kept.

For animation, WebP and AVIF can both hold several frames, like a GIF but with far better compression. JPG and plain PNG are still pictures. The converter reads only the first frame of a GIF, so it is meant for still images, not for converting animations.

Support: what opens where

JPG, PNG and GIF work in every version of every major browser, and in practically every app and upload form. That is their great strength.

WebP now has broad support in current browsers, though older systems may lack it; on a Mac, Safari needs version 14 and macOS Big Sur or later. AVIF is newer still: Chrome and Opera added it in 2020, Firefox in 2021 and Safari in 2022. Websites that use AVIF usually provide a fallback for older browsers.

Outside the browser, support varies more. Upload forms, office software and printing services often ask for JPG or PNG, so check what the destination accepts before choosing a newer format.

File size

WebP was designed to produce smaller files than JPEG at comparable quality, and AVIF aims to be smaller than both. How much smaller depends on the picture, so compare the results on your own images rather than relying on a fixed figure.

A simple decision guide

Start from what the picture shows and where it's going:

  • A photo for a form, an email or anyone who must be able to open it: JPG.
  • A photo for your own website: WebP or AVIF for smaller files, ideally with a JPG fallback.
  • A screenshot, chart or anything with small text: PNG, or lossless WebP.
  • A logo or icon: SVG if you have the vector original, because it stays sharp at every size; otherwise PNG with transparency.
  • Anything with a transparent background: PNG, WebP or AVIF, never JPG.
  • A master copy you'll edit again later: keep a lossless version and export lossy copies from it.

Converting between formats

Changing the format can't add back quality that has already been lost. A JPG saved as PNG keeps every flaw of the JPG and usually becomes much bigger, because PNG has to store those flaws losslessly. Converting a PNG screenshot to JPG goes the other way: smaller, but with blur around text.

The image converter reads JPG, PNG, WebP, AVIF, HEIC, GIF, BMP, ICO and SVG and saves as JPG, PNG, WebP or AVIF. Pick the format under Save as, and use Quality for the lossy formats. Photo details are only written into JPG files; PNG, WebP and AVIF results are always saved without them. Everything runs in your browser, so the images are never uploaded.

Save the same photo as JPG, WebP and AVIF and compare the file sizes on your own picture.

Open the image converter

Quick check

Three questions. Pick an answer to see why.

  1. You need to send a screenshot full of small text. Which format keeps the text sharpest?

    Show the answer

    Answer: PNG PNG is lossless, so the edges of letters stay crisp.

  2. You convert a logo with a transparent background to JPG. What happens to the transparent area?

    Show the answer

    Answer: It is filled with a background colour, white by default JPG has no transparency, so those pixels need a colour.

  3. Why might you still choose JPG for a photo instead of AVIF?

    Show the answer

    Answer: Because practically every app, form and browser opens JPG AVIF support is newer and less complete outside current browsers.

Rules change

File formats and official photo rules change. Each guide shows the date it was last checked; for forms and official photos, the authority's own page has the final word.

Sources

Last checked October 27, 2026

Free tools for files you have the right to use. Everything runs on your device; check important results (forms, prints, official photos) before you send them. Terms of use.