Choosing an image format: JPEG, PNG, WebP or AVIF
8 min read · Updated 23 October 2026
Which image format should you use? Use JPEG for photos you will email, upload to a form or print, because it opens everywhere. Use PNG for screenshots, diagrams and anything with sharp text or transparency. For a website, WebP or AVIF gives smaller files than JPEG at similar quality. For a logo or icon, use SVG if you have it. You can switch between all of these with the image converter.
Every image format is a trade-off between file size, quality, transparency and how widely it is supported. Picking the right one usually saves more space than any compression setting. This guide gives a quick answer first, then explains how each format works, what to do about iPhone HEIC photos, how to size and compress images, and how to avoid the most common mistakes.
The short answer
| You have | Use | Why |
|---|---|---|
| A photo for email, forms or printing | JPEG | Opens everywhere; good quality at small sizes |
| A photo for a website | WebP or AVIF, with JPEG as a fallback if you must support very old browsers | Smaller than JPEG at similar quality |
| A screenshot, diagram or text-heavy image | PNG (or lossless WebP) | Sharp edges and text stay crisp |
| A logo or icon | SVG if you have it; otherwise PNG | Scales without blur; transparent background |
| Something that needs transparency | PNG, WebP or AVIF | JPEG has no transparency |
| An animation | A video (MP4 or WebM) where possible; GIF only when it must be a GIF | GIF is limited to 256 colors and files are large |
| An iPhone photo for someone with a Windows PC or an older app | JPEG | HEIC is not opened everywhere |
The main formats
| Format | Compression | Transparency | Animation | Good for | Watch out for |
|---|---|---|---|---|---|
| JPEG | Lossy | No | No | Photos | Blocky artifacts at low quality; repeated saves lose detail |
| PNG | Lossless | Yes | Rarely used | Screenshots, graphics, logos | Large files for photos |
| WebP | Lossy or lossless | Yes | Yes | Web photos and graphics | A few older apps cannot open it |
| AVIF | Lossy or lossless | Yes | Yes | Web photos at small sizes | Slower to create; some software cannot open it |
| GIF | Lossless, 256 colors | 1-bit only | Yes | Simple animations | Poor for photos; big files |
| SVG | Vector (shapes, not pixels) | Yes | Yes (limited) | Logos, icons, charts | Not for photos |
| HEIC | Lossy | Yes | Yes | iPhone photos | Not opened by many sites and Windows apps |
How much smaller are WebP and AVIF?
Google's own comparison of WebP and JPEG found that, on average, WebP files were 25% to 34% smaller than JPEG at an equivalent quality score. Your results depend on the image. AVIF often gets smaller still, but it takes longer to encode and results vary by picture. Always compare the actual files, not just the labels.
Browser support
At the time of writing, both formats work in current versions of the major browsers. WebP works in Chrome 32 and later, Firefox 65 and later and Safari 16 and later, and AVIF in Chrome 85 and later, Firefox 93 and later and Safari 16.4 and later. The coverage figures on caniuse.com are about 97% of users for WebP and about 96% for AVIF. Those numbers move over time, so check the live data if your audience includes very old devices.
Support outside browsers is different. Many email clients, document editors, print shops and upload forms accept only JPEG and PNG. When in doubt about where an image will end up, use JPEG or PNG.
Lossy and lossless
Lossy formats (JPEG, lossy WebP, AVIF, HEIC) throw away detail the eye is unlikely to notice. Each time you open and save a lossy file again, a little more detail is lost, like a photocopy of a photocopy. Keep an original and always export from it.
Lossless formats (PNG, lossless WebP) keep every pixel. They are larger for photos but ideal for screenshots, where lossy compression creates visible smudges around text and thin lines.
Quality settings
Lossy encoders take a quality number, usually 0 to 100. It is not a percentage of anything. It controls how aggressively detail is discarded. For photos, quality 75 to 85 is a good default. Below about 60, blocky artifacts and color banding become visible, especially in skies and gradients.
If a form demands a maximum size, such as 200 KB, search for the highest quality that fits instead of guessing. The target-size image compressor does exactly that: set a target such as 100 KB or 500 KB and it finds the highest-quality JPEG, WebP or AVIF under that size, and resizes only when quality alone cannot reach it.
Dimensions matter more than you think
A 12-megapixel phone photo (4032 by 3024 pixels) holds about 12.2 million pixels. Shown at 800 pixels wide on a web page, it wastes most of them. Here is how the pixel count falls when you resize:
| Size | Pixels | Share of the original |
|---|---|---|
| 4032 × 3024 (original) | 12.2 million | 100% |
| 1600 × 1200 | 1.9 million | 16% |
| 800 × 600 | 0.48 million | 4% |
For a spot that is 800 pixels wide on the page, a 1600-pixel image already covers high-density (2x) screens. Resizing to the size an image will actually be shown, and then compressing, often cuts the file size by more than 80%. Do these steps in this order:
- Resize with the batch image resizer, by pixels, percentage or longest side.
- Choose the format.
- Compress to a quality or target size.
A photo's decoded size in memory is about width × height × 3 bytes, which for a 12-megapixel photo is roughly 36 MB, however small the file looks on disk. That is another reason to resize images before putting many on one page.
HEIC photos from iPhones
iPhones save photos in HEIC by default. It is efficient, but many websites and Windows apps cannot open it. You have three options:
- Change the camera setting. On an iPhone, go to Settings, then Camera, then Formats, and choose Most Compatible. New photos are saved as JPEG.
- Convert when you share. Many apps convert for you, but not all. A file sent as the original may stay HEIC.
- Convert later. The image converter turns HEIC into JPEG on your device, in bulk. It converts between JPEG, PNG, WebP, AVIF, GIF, BMP, TIFF and ICO, including iPhone HEIC photos.
On a Mac, Preview opens HEIC files and can export them: choose File, then Export, and pick JPEG or PNG. On Windows, the Photos app may need the HEIF and HEVC extensions from the Microsoft Store before it opens HEIC.
Using several formats on a web page
If you publish images on a website, the HTML <picture> element lets a browser pick the first format it understands:
<picture>
<source srcset="photo.avif" type="image/avif">
<source srcset="photo.webp" type="image/webp">
<img src="photo.jpg" width="800" height="600" alt="A description of the photo">
</picture>
The JPEG at the end is the fallback. Setting width and height lets the browser reserve space and avoids the page jumping as images load. Always write alt text that describes what the image shows.
Logos, icons and favicons
A logo should be an SVG whenever you have one, because it stays sharp at any size. If you only have pixels, use PNG with a transparent background, large enough for the biggest place you will use it. For a website icon, the favicon generator creates favicon.ico, PNG icons, an Apple touch icon and a web manifest from one image.
Metadata and privacy
Photos carry EXIF metadata: camera model, date and often GPS coordinates. Converting a file usually drops most of it, but not always. If you are sharing original photos, check them first and remove location data with the image metadata tool. It shows EXIF, GPS, XMP and IPTC data and can remove it from JPEG, PNG and WebP files without re-encoding the image itself.
Common mistakes
- Saving a screenshot as JPEG. Text gets fuzzy halos. Use PNG.
- Saving a photo as PNG. The file is many times larger than a JPEG with no visible benefit.
- Compressing an already-compressed JPEG over and over. Go back to the original each time.
- Making an image bigger than its original. Upscaling cannot add detail.
- Renaming
photo.heictophoto.jpg. The extension changes, but the contents do not, and it will not open. Convert the file. - Using GIF for photos or long clips. A short MP4 or WebM is usually much smaller.
FAQ
Is PNG or JPEG better? Neither is better overall. JPEG suits photos, because its lossy compression keeps files small. PNG suits screenshots, logos and graphics with sharp edges or transparency, because it keeps every pixel exactly.
Is WebP better than JPEG? For websites, usually yes: Google's tests found WebP files 25% to 34% smaller on average at equal quality, and browser support is wide. For email, forms and printing, JPEG is still the safer choice.
Should I use AVIF? AVIF can give the smallest files for photos on websites and works in all current major browsers. It is slower to create and not supported by all software outside the browser, so keep a JPEG or WebP fallback.
Why can't I upload my iPhone photo? It is probably a HEIC file, and the site accepts only JPEG or PNG. Convert it, or set the camera to Most Compatible.
What image size should I use for a website? Use about the displayed width, doubled for high-density screens. A picture shown 800 pixels wide needs a file about 1600 pixels wide at most.
Does converting an image reduce its quality? Converting to a lossy format (JPEG, lossy WebP, AVIF) always discards some detail. Converting to a lossless format (PNG) does not lose more, but it cannot bring back detail that earlier compression removed.