JPG vs PNG vs WebP vs AVIF: which image format should you use?
Most of the time you don't need to think about image formats, until a form rejects your file, a page loads slowly, or a logo ends up with a white box around it. Here's how the common formats differ and when to use each.
The short answer
- Photos you share, email or upload: JPG.
- Screenshots, logos, diagrams and anything with text: PNG.
- Images on your own website: WebP (or AVIF if you want the smallest files).
JPG (JPEG)
The universal photo format. It uses lossy compression: it throws away detail your eye is unlikely to notice, which makes photos small. Every device, app and website accepts it.
Weak spots: no transparency, and sharp edges like text or lines get fuzzy "artifacts" around them. Re-saving a JPG many times slowly degrades it.
PNG
Lossless: every pixel is stored exactly. That makes it ideal for screenshots, interface images, logos and diagrams, and it supports transparency. For photos, though, PNG files are typically several times larger than JPG with no visible benefit.
WebP
A newer format designed for the web. It can be lossy (like JPG) or lossless (like PNG), supports transparency, and is usually 25–35% smaller than JPG at similar quality. All current browsers display it. Many older desktop apps, editors and upload forms still don't accept it, which is why people often need to convert WebP to JPG.
AVIF
An even more efficient format that's increasingly used by websites. Files can be considerably smaller than WebP. Support in current browsers is good, but many editors, forms and older devices can't open it yet, so convert AVIF to JPG when you need to share one.
HEIC
Apple's default camera format on iPhone. It's efficient, but poorly supported outside Apple devices. Our guide to HEIC files explains your options.
Comparison
| JPG | PNG | WebP | AVIF | |
|---|---|---|---|---|
| Best for | Photos | Graphics, text | Web images | Web images |
| Compression | Lossy | Lossless | Both | Both |
| Transparency | No | Yes | Yes | Yes |
| Photo file size | Small | Large | Smaller | Smallest |
| Accepted by forms and apps | Everywhere | Almost everywhere | Often | Sometimes |
Myths worth knowing
"Converting to PNG improves quality." It doesn't. It preserves the current quality exactly, including any JPG artifacts, in a bigger file.
"Changing the file extension converts the image." Renaming photo.webp to photo.jpg doesn't change the data inside, and many sites will still reject it. Use a real converter like the Image Converter.
"Higher DPI means a better photo." DPI only affects printing. On screens and in upload forms, what matters is the pixel dimensions and the file size.
Tools used in this guide
More guides
- How to Get a Photo Under the Size Limit for an Online Application
- How to Remove Location Data From Photos (iPhone, Android, Windows, Mac)
- What Is a HEIC File? How to Open and Convert iPhone Photos
- How to Make a QR Code That Always Scans
- How to Turn Photos of Documents Into a Clean PDF
- How to Send Large Photos by Email Without Hitting the Size Limit
- How to Merge PDF Files on Windows, Mac, iPhone and Android
- How to Rotate a PDF Permanently (So It Stays the Right Way Up)
- What Size Should Images Be for a Website? Dimensions, KB and Format
- How to Share Your WiFi With a QR Code (iPhone, Android and Printed)
- Why Do Images Save as WebP? How to Get a JPG or PNG Instead