AVIF vs WebP vs JPG: which image format should you use?
Convert AVIF to JPGThree formats dominate photos today. JPG is the universal veteran. WebP is the web’s efficient workhorse. AVIF is the newest and smallest. Each is the right answer in different situations, and choosing well can make a website noticeably faster or save you from sending a file nobody can open.
Here’s a practical comparison, without the codec jargon.
Got an AVIF you can't open? Turn it into a JPG in seconds.
Open AVIF to JPGThe one-minute summary
| JPG | WebP | AVIF | |
|---|---|---|---|
| Introduced | 1992 | 2010 | 2019 |
| Typical size vs JPG | baseline | ~25–35% smaller | ~50% smaller |
| Transparency | No | Yes | Yes |
| Animation | No | Yes | Yes |
| Browser support | Universal | All current browsers | All current browsers |
| Support in other apps | Universal | Good, some gaps | Patchy |
| Encoding speed | Fast | Fast | Slow |
Rule of thumb: use JPG to share, WebP on websites, and AVIF on websites when you want the smallest files and can keep a fallback.
JPG: the format everyone can open
JPG (or JPEG) has been the standard photo format for more than thirty years. Every camera, phone, computer, printer, email client and website understands it.
Strengths: universal compatibility, fast to create and open, good quality at sensible settings.
Weaknesses: larger files than modern formats, no transparency, and visible blocky artefacts at low quality, especially around text and sharp edges.
Use JPG when you’re sending photos to other people, uploading to forms, printing, or you don’t know what software the recipient has. If someone sends you a newer format, converting to JPG is the safe move: WebP to JPG, AVIF to JPG, HEIC to JPG.
WebP: the practical web format
WebP was created by Google to make web pages lighter. It does both lossy compression (for photos) and lossless compression (for graphics), supports transparency and animation, and is supported by every current browser, including Safari since 2020.
Strengths: meaningfully smaller than JPG and PNG, fast to encode and decode, transparency support, very wide browser support.
Weaknesses: some desktop apps, office suites and upload forms still don’t accept it.
Use WebP when you’re publishing images on a website or app. It’s the easy default: smaller than JPG, nearly universal in browsers, and quick to generate. Convert existing site images with JPG to WebP, which accepts PNG too.
AVIF: the smallest files
AVIF stores images using AV1, a royalty-free video codec developed by the Alliance for Open Media. It typically produces the smallest files of the three at the same visual quality, and it handles smooth gradients and high dynamic range (HDR) particularly well.
Strengths: the best compression of the three, transparency, HDR and wide colour support, royalty-free.
Weaknesses: slow to encode (a problem for large batches or on-the-fly generation), support outside browsers is still limited, and at very low quality it can look smeared rather than blocky.
Use AVIF when you’re optimising a website for speed and your platform or CDN can generate it for you, ideally with WebP or JPG as a fallback for older browsers. Avoid AVIF for files you’re sending to people; convert to JPG first with AVIF to JPG.
Quality: does smaller mean worse?
Not necessarily. At the same file size, AVIF usually looks best, WebP second and JPG third. Or put the other way: at the same visual quality, AVIF files are smallest.
What each format does when pushed too far differs:
- JPG gets blocky, with “mosquito noise” around edges and text.
- WebP gets blurry and loses fine texture.
- AVIF gets smooth and painterly, losing fine detail like skin texture or foliage.
For typical web use at sensible settings (around 75–85% for JPG and WebP), all three look good.
Transparency and graphics
JPG can’t do transparency at all. WebP and AVIF both can, which makes them good replacements for PNG on websites: a transparent logo as WebP is usually much smaller than the PNG.
For editing work, PNG is still the most widely supported lossless format. If you have a transparent WebP or AVIF you need to edit, convert it to PNG with WebP to PNG or AVIF to JPG (choose the PNG option).
Compatibility outside the browser
This is where the formats differ most:
- JPG opens everywhere.
- WebP opens in recent Windows and macOS viewers, most image editors and most social networks, but some office software, print services and upload forms still reject it.
- AVIF opens in recent operating systems and some editors, but many apps and services don’t support it yet.
If a file is going to a person, an office, a printer or a form, JPG is the safe choice.
What we recommend
For a website:
- Resize images to the largest size they actually display (Resize image).
- Serve WebP as the default (JPG to WebP).
- If your platform supports it, add AVIF for browsers that accept it, with WebP or JPG as the fallback.
For sharing photos: JPG. Convert anything else to JPG first.
For editing: PNG (lossless), then export the finished image as JPG or WebP.
For storage on an iPhone: HEIC is fine; convert when you share. See how to stop your iPhone saving HEIC if you’d rather not.
The short version
JPG works everywhere, WebP is smaller and works in every browser, and AVIF is the smallest but least supported outside browsers. Use WebP (and optionally AVIF) on your website, and JPG for anything you send to people. When someone sends you a format you can’t open, convert AVIF to JPG or WebP to JPG in your browser, with no upload.