JPEG, PNG, WebP or AVIF? How to Choose an Image Format
JPEG, PNG, WebP or AVIF: transparency, lossy versus lossless, compatibility and size, what each format suits, which conversions make sense, and what converting costs.
Written by Faruq Zhao Updated 2026-10-31
Choosing an image format comes down to two questions: does this image need transparency or pixel-exact fidelity, and how old is the environment it has to open in? JPEG is the universal default, PNG owns sharp graphics and transparency, WebP can replace both on the web, and AVIF compresses hardest with the narrowest support.
The question people actually ask most is one: does converting between formats cost quality? Sometimes none at all, sometimes a lot — and what decides it is not the format's name but how many lossy passes the file has already been through.
Two questions decide most of it
Format choice looks like taste; it isn't. Two properties do the deciding: does the image need an alpha channel, and can it accept lossy compression. Size, compatibility and tool support all follow from those two.
- Transparency: logos, icons, cut-out product shots and UI overlays all need alpha. JPEG can't store it; PNG, WebP and AVIF can.
- Fidelity: screenshots, text-heavy images, line art and anything you'll edit again should stay lossless. Photos don't need to.
- Compatibility: if the file has to open in old Windows software, a print shop's pipeline, a government form or someone's mail client, the answer is JPEG and PNG only — nothing newer is safe.
- Size: when the file travels over the network to a browser, modern codecs get much smaller — while you keep a fallback for old environments.
The most common mistake is treating all of these as one question. Converting a JPEG to PNG does not improve it — the loss happened at the first save — it only inflates the file. Converting a screenshot to JPEG doesn't turn it into a photo; it softens the text.
The formats side by side
Common image formats at a glance
| Format | Alpha | Lossy/lossless | Browser support (rough picture) | Typical use |
|---|---|---|---|---|
| JPEG | No | Lossy | Every browser and virtually all software | Photos, web images, email, uploads, print |
| PNG | Yes, incl. semi-transparency | Lossless, plus palette mode | Every browser | Screenshots, logos, icons, line art, transparency |
| WebP | Yes | Both lossy and lossless, animations too | Broad in modern browsers; supported earlier than AVIF | Web and product images; can replace JPEG and PNG |
| AVIF | Yes | Both lossy and lossless | Later than WebP, narrower: recent browsers only, often fails in old software | Size-critical web images, with a fallback |
| GIF | Yes, but fully-on/fully-off only | Lossless within a 256-color palette | Every browser | Short animations, reaction images |
| BMP | Essentially no | Effectively uncompressed | Most systems can read it; not a publishing format | Legacy Windows programs, intermediate files |
| TIFF | Varies by variant, mostly yes | Can be lossless or lossy | Most browsers won't display it | Print, scanning, archiving |
Two rows in that table are really about trust, not image quality: PNG is universal because it standardized in the 90s, and AVIF's coverage is narrow purely because it's young. When a file has to open on someone else's machine, how long a format has been supported beats how advanced it is.
What lossy and lossless actually mean
Lossless means decoding reproduces exactly the input pixels: open and re-save as many times as you like, nothing degrades, because the encoder only removed statistical redundancy. PNG, lossless WebP, lossless AVIF and lossless TIFF all behave this way.
Lossy means the encoder discarded what it judged you wouldn't notice — mostly high-frequency detail, fine texture. JPEG, lossy WebP and lossy AVIF all do this, and photos come out much smaller for it. Once the loss is written into a file it's permanent; nothing downstream brings it back.
- Screenshots, interfaces, text, diagrams, logos, scans, and anything you'll keep editing: lossless.
- Photos and images with large smooth gradients: lossy — the eye is forgiving of exactly this content.
- Lossless does not mean small: the same photo as a PNG is usually far larger than a high-quality JPEG.
- Lossy does not mean visibly degraded: with sane settings nothing shows at normal sizes — magnification and repeated recompression are where it appears.
Picking by task
Format by use case
| Task | Recommended | Why |
|---|---|---|
| Web page images and heroes | WebP; AVIF plus a WebP or JPEG fallback if you're chasing the limit | Smallest file without giving up coverage |
| Screenshots and UI captures | PNG; lossless WebP on the web | Text and sharp edges stay sharp |
| E-commerce main images | JPEG on most platforms — read the platform's rules first | Platforms usually just mandate JPEG |
| TIFF or high-quality JPEG; ask the printer first | A near-lossless master is what survives the print pipeline | |
| Archiving and masters | TIFF or PNG for the lossless copy; keep the original raw or HEIC too | You want a file you can re-export years from now |
On e-commerce platforms and government forms, the written rule usually beats the technically better choice. Read the requirements: they generally state format, size cap and pixel dimensions. An entry that says "JPEG, 100 KB" is telling you your transparent PNG won't pass.
When to convert, and when not to
Convert when the destination can't read what you have:
- An upload form, printer or legacy program accepts only JPEG or PNG, and you're holding WebP, AVIF, HEIC or TIFF.
- A page's images are too heavy and you can move to a modern format without hurting older browsers.
- You need transparency the file doesn't have — the target there is PNG or WebP.
- A platform caps file size, and a format change clears it without touching the pixels.
Don't convert when:
- You're hoping for better quality. Re-encoding adds no detail; a JPEG saved as PNG has exactly the pixels it had, in a bigger file.
- You just want it smaller and the current format is already efficient — the compression settings matter more than the extension.
- The file is an animation and the target is static: you get frame one, and no animation.
Does converting cost quality?
It depends on the direction:
What each conversion direction does
| Direction | Quality impact | Notes |
|---|---|---|
| Lossless to lossless, e.g. PNG → lossless WebP | None | Identical pixels, different encoding |
| Lossy to lossless, e.g. JPEG → PNG | No worse | Same picture, bigger file — rarely worth doing |
| Lossless to lossy, e.g. PNG → JPEG or WebP | Some loss | Sharp edges and text suffer first; photos barely show it |
| Lossy to lossy, e.g. JPEG → WebP, AVIF | A stacked generation of loss | Usually invisible at high quality, and the file often shrinks a lot |
Two details people miss. First, every lossy re-encode is cumulative: the same photo bounced between formats degrades each time, so always convert from the best original you have. Second, tools on this site redraw the image at 8 bits per channel before encoding, so higher bit depth (10-bit HDR, say) doesn't survive, and capture time, device and GPS are stripped — a redraw carries pixels, not metadata.
Using the tools in the browser
The site's four converters — image to WebP, to AVIF, to JPEG, to PNG — share one browser-side implementation, so they behave identically:
- Nothing uploads. Decode and encode both happen in your browser; HEIC is handled by this site's self-hosted libheif WebAssembly decoder, downloaded on first use.
- Inputs: HEIC, HEIF, PNG, JPEG, WebP, AVIF, BMP, TIFF, ICO and SVG, up to 50 MB per file; TIFF and HEIC each have their own built-in decoder.
- Select many files at once; download individually or as one ZIP.
- The quality slider only applies to lossy outputs — JPEG, WebP, AVIF; PNG and BMP ignore it. Put differently: this site's WebP and AVIF outputs are lossy; choose PNG when you need lossless.
- Reading a format and writing it are different jobs. Every browser can write PNG and JPEG, and nearly all write WebP; no browser natively encodes AVIF, so the AVIF page ships its own encoder (about a 1 MB download, once, then cached). Chrome has been tested: asked for AVIF it doesn't error — it silently hands back PNG, which is what the spec tells every browser to do — so the page checks the file type before handing it over. If the encoder genuinely can't load, the page says so instead of handing you a file with the wrong extension; for batches that matter, test with one file first.
- Converting does not change pixel dimensions — resize separately when the target caps width and height.
FAQ
WebP or AVIF?
At equal quality AVIF is usually smaller, but WebP has the broader footprint and reached older browsers. When you control both ends, AVIF with a WebP fallback is the best deal; when you're sending a file to a person or a service, WebP is the safer modern pick, and JPEG the safest of all.
Will converting JPEG to PNG make it better?
No. What JPEG discarded stays gone, and the PNG usually lands several times larger. Choose PNG only when you need transparency, or when lossless editing starts from here.
Why can't my colleague open the WebP or AVIF I sent?
Because their browser or software predates the format's support. WebP's support is older and broader, but both fail in genuinely old software. Send JPEG or PNG.
Can I just use JPEG for everything?
For photos you send people, mostly yes — it opens everywhere. For your own site, WebP or AVIF with a JPEG fallback shrinks files without losing coverage. For screenshots, transparency and text-heavy images, JPEG is the wrong choice.
Does conversion change dimensions or metadata?
Dimensions don't change; pixels are copied as-is. Metadata does change: conversion redraws the image, and a redraw carries pixels only — capture time, device and GPS are lost. Keep the original if you need them.
Further reading
- HEIC and JPEG — the high-frequency iPhone case, dissected.
- Local vs server processing — verifying that these converters really never upload.
- Image to WebP, Image to AVIF — the converters under discussion.
Tools used in this guide
Image to WebP Converter
Convert HEIC, PNG, JPG, AVIF, SVG, BMP, TIFF and ICO to WebP online. Usually smaller than JPG at the same look — adjustable quality, transparency intact. 100% local, ZIP download.
Image to AVIF Converter
Convert HEIC, PNG, JPG, WebP, SVG, BMP, TIFF, ICO to AVIF online for free. At equal visual quality AVIF is usually smaller than JPG. 100% local processing.
Image to JPG Converter
Convert HEIC, PNG, WebP, AVIF, SVG, BMP, TIFF and ICO to JPG free online. Adjustable quality, transparency flattened to white, batch ZIP download. 100% local, no upload.
Image to PNG Converter
Convert HEIC, JPG, WebP, AVIF, SVG, BMP, TIFF and ICO to PNG free online. Supports transparency, batch conversion and ZIP download. 100% local, no upload.
HEIC to JPG Converter
Convert iPhone HEIC/HEIF photos to JPG free online. Windows, web forms and older software can't open HEIC — JPG works everywhere. 100% local, photos never leave your device.
More guides
How Minecraft Locator Bar Colors Are Calculated (Java and Bedrock)
Where locator bar colors come from: the UUID hash on Java Edition, the join-order assignment on Bedrock, the Xbox ID mapping through Geyser, and the /waypoint syntax.
HEIC and JPEG: What iPhone HEIC Files Are and When to Convert Them
How the HEIF container relates to HEVC, why Apple chose it, how it compares with JPEG on size and compatibility, when conversion is mandatory, and how to convert in bulk offline.
Passport and Visa Photo Requirements: Pixels, DPI and File Size Limits
Why ID photos fail at the last step: print sizes to pixels, where 50 KB and 100 KB limits come from, why some are ranges not caps, and how to hit one without losing the face.