JPG, PNG, WebP or AVIF: which format, and how to convert

2 min read

Most image problems are format problems. A logo saved as JPEG has fuzzy edges; a photograph saved as PNG is ten times bigger than it needs to be; a transparent sticker saved as JPEG has a black box behind it. Choosing the right format usually does more than any compression setting.

This converter re-encodes an image with your browser’s own encoder, so the picture is never uploaded and the output is exactly what the browser you are using can produce.

Open tool →Convert image formatConvert between JPG, PNG, WebP and AVIF using your browser’s own encoder.

What each format is for

JPEG

For photographs and anything with smooth gradients. Lossy, no transparency, universally supported. The safe default for a picture that will be e-mailed or posted.

PNG

For screenshots, logos, icons, line art and anything that needs transparency. Lossless, so text and hard edges stay crisp — and large, because lossless is expensive on photographic detail.

WebP

A modern format that does both: lossy and lossless modes, transparency, and typically 25–35% smaller than JPEG at comparable quality. Supported by every current browser.

AVIF

The most efficient of the four for photographs, frequently half the size of JPEG at the same quality. Support is good in current Chrome, Edge and Safari but not universal, and encoding is slower.

A simple decision list

  • Photograph for the web → WebP, or AVIF if you can test support.
  • Photograph to e-mail or print → JPEG.
  • Logo, icon, screenshot with text → PNG, or SVG if you have the vector original.
  • Transparent cut-out → PNG or WebP.
  • Something you will edit again → keep a lossless master and export copies.

Converting without losing more than you must

Every lossy re-encode loses a little. Converting JPEG → WebP → JPEG is two losses, not one. Where it matters, convert once from the original and keep that.

Going the other way is safer: PNG → JPEG is a lossy step but from a lossless source, so you only pay once.

The steps

Convert an image in your browser

  1. Open the fileDrop the image on the converter.
  2. Pick the target formatThe tool offers only the formats your browser can actually encode.
  3. Set quality for lossy targetsJPEG, WebP and AVIF take a quality value; PNG does not.
  4. Convert and downloadThe new file is produced locally.

If a format you expected is missing, the tool says so rather than producing a broken file — AVIF encoding in particular depends on the browser.

Tools used in this guide

Questions about this guide

Does converting JPG to PNG improve quality?
No. The detail JPEG already discarded is gone. PNG will be lossless from that point on, and much larger, but it cannot recover what was removed.
Which is smaller, WebP or AVIF?
AVIF is usually smaller at the same visual quality, but encoding is slower and support is less universal. WebP is the safer choice for a public web page.
Will transparency survive?
It survives into any format that supports it — PNG, WebP and AVIF. Converting to JPEG flattens transparency onto a background colour, which is why a transparent logo can turn into a black box.
Can I convert a HEIC photo from my phone?
Only if your browser can decode it. Safari can; most others cannot. Export to JPEG from the phone first.

All guides

Written and maintained by the FreeOnlineBox project. Every tool named in this guide runs on the reader’s own device; no file described here is uploaded to check it.