JPG vs PNG vs WebP vs HEIC
Updated 2026-09-20
Four formats cover almost every image you will meet. JPEG (1992) is the universal lossy photo format. PNG (1996) is lossless and supports transparency, which makes it the right choice for screenshots and logos and the wrong one for photos. WebP (Google, 2010) does both lossy and lossless with transparency and produces files about a quarter to a third smaller than JPEG at the same visual quality. HEIC (Apple's HEIF container with HEVC compression, default on iPhone since iOS 11 in 2017) is roughly half the size of JPEG for the same quality but is barely supported outside Apple devices.
The practical question is rarely "which is best" but "which will the destination accept". Government portals, exam sites and most HR systems accept JPEG and often PNG, and reject WebP and HEIC outright. Websites you control benefit from WebP. Your own photo library is fine in HEIC until you need to send a file somewhere.
Side by side
| Criterion | JPG | PNG | WebP | HEIC |
|---|---|---|---|---|
| Compression | Lossy | Lossless | Lossy or lossless | Lossy (HEVC), lossless possible |
| Transparency | No | Yes (alpha) | Yes (alpha) | Yes |
| Animation | No | APNG variant only | Yes | Yes (image sequences) |
| Typical photo size vs JPEG | 100% | 300 to 500% (lossless) | About 65 to 75% | About 50% |
| Colour depth | 8-bit | 8- or 16-bit | 8-bit | 8- or 10-bit |
| Browser support | All | All | All modern (Safari 14+, 2020) | Safari 17+ only |
| Windows / Android support | Built in | Built in | Built in (Windows 10+, Android) | Windows needs the HEVC extension; Android 10+ partial |
| Accepted by government and exam portals | Almost always | Often | Rarely | Almost never |
| Best for | Photos for upload and sharing | Screenshots, logos, graphics with text | Web images you serve yourself | iPhone camera storage |
Photos: JPG for sending, HEIC for keeping, WebP for the web
A phone photo saved as HEIC is typically 1.5 to 2.5 MB where the same picture as JPEG is 3 to 5 MB. That saving is why Apple switched the default, and it is invisible until you attach the file to a web form and get "unsupported file type". Convert to JPG at 85 to 92% quality and the difference from the original is imperceptible at screen size. Keep the HEIC in your library if you like; the JPG is the copy you send.
On a website you control, WebP is the better lossy format: 25 to 34% smaller than JPEG at equal quality in Google's measurements, with alpha transparency and animation. Every current browser decodes it. Serve WebP with a JPEG fallback only if you still support very old browsers; otherwise WebP alone is safe.
Graphics: PNG unless size matters, then lossless WebP
JPEG blurs sharp edges: text in a screenshot, a logo, a chart. PNG reproduces them exactly and keeps transparent areas, at the cost of much larger files for anything photographic. For a screenshot with a lot of flat colour PNG is often smaller than JPEG anyway. If you need transparency on the web with a smaller file, lossless WebP is typically 25% smaller than an equivalent PNG.
Do not use PNG for photos you upload to forms with a size limit: a 12-megapixel photo as PNG is 20 MB or more. Convert it to JPG first; the PNG to JPG tool flattens transparency onto white.
What upload forms actually accept
Across the visa, ID and exam portals documented in our guides, JPEG is accepted everywhere and is the only format on several of them (US DS-160, India eVisa, Saudi Absher). PNG is accepted by some. WebP and HEIC appear on none of them. When in doubt, upload a JPEG: it is the one format no server rejects.
Which should I use?
- If you are…Uploading a photo to a visa, ID, job or exam portalChooseJPGAccepted everywhere; keep quality at 85% or higher and compress to the KB limit if there is one.
- If you are…Sharing a screenshot, logo or diagram with textChoosePNGLossless edges and transparency; JPEG artefacts make text fuzzy.
- If you are…Serving images on your own websiteChooseWebPA quarter to a third smaller than JPEG, transparency and animation, supported by all current browsers.
- If you are…Storing photos on an iPhone or MacChooseHEICHalf the size of JPEG with better colour depth; convert only when you need to send a file elsewhere.
- If you are…Emailing photos to someone on Windows or AndroidChooseJPGHEIC may not open without extra codecs; JPEG always does.
Frequently asked questions
Is WebP better than JPEG?
For file size at the same quality, yes, by roughly 25 to 34%. For compatibility with upload forms, no: many still reject it. Use WebP where you control the destination and JPEG where you do not.
Does converting HEIC to JPG lose quality?
A little, because JPEG re-compresses the image, but at 90% quality the loss is not visible at normal viewing sizes. The bigger loss is metadata such as depth maps, which JPEG cannot carry.
Why is my PNG so large?
PNG is lossless, so a photo with millions of subtly different colours compresses poorly. PNG is designed for flat colour and sharp edges. Convert photos to JPG or WebP.
Can I keep transparency and still get a small file?
Use WebP (lossy with alpha) for the smallest result, or PNG-8 with a limited palette for simple graphics. JPEG cannot store transparency at all.
What about AVIF?
AVIF (based on the AV1 video codec) is smaller still than WebP and is supported by current Chrome, Firefox and Safari, but encoding is slow and support outside browsers is thin. For most uploads it is not yet an option.