JPG, PNG, WebP, AVIF or HEIC: which image format to use when
Every image format is a trade-off between quality, file size and who can open it. A practical guide to choosing — and converting — without losing quality you will miss.
Lossy and lossless
Image formats fall into two families. Lossy formats such as JPG throw away detail the eye is unlikely to miss, which makes photos small. Lossless formats such as PNG keep every pixel exactly, which suits sharp lines and text but makes photos large.
One rule follows from this: every time you save a lossy image again, a little more detail is lost. Edit from the original and save the lossy version once, at the end.
The formats one by one
- JPG — the universal photo format. Small, readable everywhere, no transparency. Poor for text and logos: sharp edges get a faint halo.
- PNG — lossless, with transparency. The right choice for logos, icons, screenshots and anything with text; far too large for photos.
- WebP — developed for the web; can be lossy or lossless and supports transparency. Photos are typically a quarter to a third smaller than a JPG of similar quality, and every current browser shows it.
- AVIF — newer and often smaller still, built on the royalty-free AV1 codec. All major browsers support it today, but it is slower to create and not every program opens it yet.
- HEIC — the default on iPhones since 2017. Very efficient, but built on a patented codec, so Windows and many websites do not open it without extra software.
- GIF — limited to 256 colours, still used because it animates everywhere. For anything longer than a few seconds, a short video is far smaller.
Which one for what
- Photos to email or share — JPG, at a quality of about 80 to 85.
- Photos on a website — WebP, or AVIF if your site supports it, with a JPG fallback only where really needed.
- Logos, icons, screenshots, diagrams — PNG, or SVG if you have the logo as vectors.
- Anything that needs a transparent background — PNG or WebP. JPG cannot be transparent.
- Short animations and stickers — GIF; for longer clips, MP4 or WebM video.
- Print — keep the original at full resolution; PNG or TIFF if a lossless copy is requested.
Size: resolution first, quality second
The biggest saving is rarely the format: it is the resolution. A phone photo of 4000 pixels wide shown in a 1200-pixel column carries eleven times more pixels than anyone sees. Resize to the size you need first, then compress.
For JPG and WebP, a quality setting of 80 to 85 is the sweet spot for photos. Below 75, smooth areas start to show blocks; above 95, the file grows quickly for a difference nobody can see. Our image compressor shows the size before and after, so you can judge for yourself.
Converting without losing quality
- Convert from the original, not from an earlier converted copy.
- Converting a JPG to PNG does not bring back lost detail; the file only gets bigger.
- Converting a transparent PNG to JPG fills the transparency with a solid colour. Use WebP to keep it and still save space.
- An iPhone HEIC photo converts best on the Apple device itself: our photo converter uses the decoder your Apple device already has, rather than shipping its own. AVIF reads everywhere.
- To enlarge a small image, plain resizing gives a soft result; the photo upscaler reconstructs detail when you enlarge four or eight times.
Where your image ends up
The right format also depends on what happens to the image next:
- Social media and messaging apps recompress everything you upload, whatever format you send. Upload a good-quality JPG at the size the platform shows; a heavily compressed file only gets worse after their second round.
- Messaging apps such as WhatsApp shrink photos sent as photos. If the recipient needs the full quality — for printing or for a job application — send the image as a document or file instead.
- Email providers usually limit attachments to roughly 20 to 25 MB in total, and large attachments are often blocked by company mail servers. A handful of photos resized to 2000 pixels and compressed rarely exceeds a few megabytes.
- Websites are judged by how fast the largest image appears. A modern format, the right size and a reasonable quality setting make a page feel faster than almost any other change.
When a logo should not be a picture at all
Photos are made of pixels; logos, icons and diagrams usually are not. If you have a logo as a vector file — SVG, EPS, AI or PDF — keep it that way: it stays sharp at every size, from a favicon to a banner, and the file is tiny. A logo saved as JPG gets fuzzy edges and a coloured background that cannot be removed cleanly.
When the only version you have is a picture, a clean PNG at a generous size is the next best thing. For a print shop, a laser cutter or a sign maker, a real vector file is needed — our guide DXF, DWG or SVG explains how to get one.
Hidden data in your photos
Photos carry metadata (EXIF): the camera, the date and, on most phones, the exact GPS location where the picture was taken. Share a photo taken at home and you may share your address. The EXIF viewer and remover shows what is in a photo and strips it. Like the converter and the compressor, it works entirely in your browser: your photos are never uploaded.
