PNG, JPG, WebP or HEIC? How to choose an image format
Save a photo as a PNG and the file lands several times bigger than it needs to be. Save a screenshot as a JPG and the text grows fuzzy halos. Send an iPhone photo to a Windows laptop and it may not open at all. Image formats feel arcane, but the subject is smaller than it looks: four formats matter day to day, two more play supporting roles, and a single idea — lossy versus lossless — explains all of them. Here is what each format is actually for, where each one falls over, and a decision guide you can apply in about five seconds.
Lossy vs lossless, in plain English
Uncompressed images are enormous. A 12-megapixel phone photo is 12 million pixels, each storing a red, green and blue value — about 36 MB of raw data. No format stores that. Every format is a strategy for shrinking it, and there are exactly two strategies.
Lossless compression is packing. Like a ZIP file, it hunts for repetition — “this row is 400 identical white pixels” — and writes it more compactly. Unpack it and every pixel comes back exactly as it was. PNG works this way. The catch is that it only wins where repetition exists: a screenshot full of flat color shrinks beautifully, while a photo — where every pixel differs slightly from its neighbors, because the real world is noisy — barely shrinks at all.
Lossy compression is editing. JPG, WebP and HEIC permanently discard detail your eye is bad at noticing — faint texture, tiny color shifts — and spend their bytes on the shapes and edges you do notice. The discarded detail never comes back, and every re-save discards a little more. In exchange, a photo can drop to a tenth of its lossless size with no visible difference at normal viewing size.
That asymmetry produces the one rule that settles most cases: photographs want lossy, graphics want lossless. Photos hide the losses; text, logos and screenshots expose them as smudges and halos — and their flat colors compress superbly without losing anything anyway.
The big four
JPG — the default for photographs
JPG has been around since 1992 and opens on anything with a screen, which makes it the safest possible answer to “will this work on their end?”. It is lossy with a quality dial: 90 looks pristine, 75 looks the same at normal size for a fraction of the bytes, 40 looks like a mistake. Its weaknesses are structural: no transparency, and sharp edges — text, line art, interface elements — sprout faint shimmer and halos. For camera output headed anywhere at all, JPG is never wrong; it is merely sometimes not the smallest option.
PNG — pixel-perfect, with real transparency
PNG (1996) is lossless: what you save is exactly what you get back, no matter how many times the file is opened and re-saved. It also supports full alpha transparency — soft shadows and rounded corners that composite cleanly onto any background — which is why interface assets and logo exports ship as PNG. It is the right format for screenshots, charts, diagrams and anything containing text. The price appears when you put a photograph in it: five to ten times the size of a JPG that looks identical, with nothing visible in return.
WebP — both jobs, smaller files
WebP (Google, 2010) was built for the web and does both jobs: a lossy mode that generally undercuts JPG at the same visual quality, a lossless mode that generally undercuts PNG, plus transparency and animation in either. Every current browser reads it — Safari was the last holdout, joining in 2020. The friction that remains lives outside the browser: an aging desktop viewer, an office suite or an email pipeline may still refuse it. A sensible policy: WebP for images on a website, JPG or PNG for files you hand directly to other people.
HEIC — the iPhone default nothing else likes
HEIC is Apple's flavor of HEIF, which stores still images using the HEVC video codec's compression. iPhones have shot it by default since 2017, and the engineering is genuinely good — roughly half the file size of a comparable JPG. The politics are not: HEVC is patent-encumbered, so support outside Apple's ecosystem ranges from partial to absent. Windows often needs a codec add-on (sometimes a paid one), Chrome and Firefox will not display it, and plenty of upload forms reject it outright. Two fixes: convert copies to JPG before sharing, or make the phone shoot JPG in the first place — Settings → Camera → Formats → Most Compatible.
Stuck with a HEIC? The image converter turns iPhone HEIC/HEIF photos into PNG, JPG or WebP right in your browser — the photo is never uploaded (here's why that matters).
The supporting cast: GIF and SVG — and what's next
GIF (1987) is a museum piece with one modern excuse. It stores at most 256 colors per frame, so photos come out visibly banded, and its transparency is on/off with no soft edges. What keeps it alive is animation — and even there, a short video file or an animated WebP does the same job at a fraction of the size. Reserve GIF for tiny, seconds-long loops where compatibility beats efficiency, and never save a photo as one.
SVG is not pixels at all — it is a text file of drawing instructions: a circle here, this radius, this fill. Because the instructions are redrawn at whatever size is needed, an SVG logo is perfectly crisp on a business card and on a billboard, often in a few kilobytes. It is the right master format for logos, icons and diagrams, and hopeless for photographs, which cannot be described as shapes. When a platform insists on pixels, rasterize a copy — the SVG to PNG converter renders your markup at any exact size.
AVIF is the one to watch. Built on the royalty-free AV1 codec, it compresses tighter than WebP, and every current browser can display it. Saving it is the weak link — support for AVIF export in everyday apps and acceptance on upload forms is still patchy — so for now it is a format to know about rather than standardize on.
Side by side
| Format | Compression | Transparency | Animation | Best for | Weak spot |
|---|---|---|---|---|---|
| JPG | Lossy | No | No | Photos, camera output | Halos on text and sharp edges |
| PNG | Lossless | Full alpha | No | Screenshots, UI, text, logos | Huge files for photos |
| WebP | Lossy or lossless | Yes | Yes | Web images of every kind | Older non-browser software |
| HEIC | Lossy (HEVC) | Yes | Rarely used | Storage on Apple devices | Barely opens anywhere else |
| GIF | Lossless, 256 colors | On/off only | Yes | Tiny simple loops | Bands photos; bloated for video |
| SVG | Vector (text) | Yes | Yes (CSS/JS) | Logos, icons, diagrams | Cannot represent photos |
The five-second decision guide
- It's a photograph → JPG at quality 80–85, or WebP if it is going on a website you control.
- It's a screenshot, chart or anything with text → PNG. If it is too big, shrink its dimensions before reaching for a lossy format.
- It's a logo or icon → keep the SVG as the master, and export PNG copies at the exact pixel sizes you need with the image resizer.
- It needs a transparent background → PNG, or WebP on the web. Never JPG — the transparency gets flattened onto a white background.
- It moves → a real video file. GIF only for tiny loops.
- It's a HEIC that won't open → convert it to JPG and move on with your day.
- Genuinely unsure → JPG if it came from a camera, PNG otherwise. You will be right nearly every time.
Compatibility notes
JPG, PNG and GIF open everywhere — every browser, operating system, office suite and photo frame made this century. Compatibility is never a reason to avoid them.
WebP is safe in every current browser and most current apps; the stragglers are older installed software and some email clients. If the destination is a web page, use it freely. If it is an attachment to a stranger, JPG or PNG spares you a support conversation.
HEIC should be treated as Apple-internal. Safari can display it, Chrome and Firefox cannot, and Windows may need an extension before Photos will open it. Converting before you share is kinder than making the recipient figure that out. SVG renders in every browser, but many upload forms and chat apps only accept raster images and will reject it. For the full support matrix, format by format, MDN's image file type guide is the reference worth bookmarking.
Right format, still too big? The image compressor shows a live before/after size readout while you drag the quality slider. Dimensions matter even more than quality — the compression guide covers the full workflow.
The bottom line
Match the format to the content, not to habit. Photographs belong in lossy containers — JPG universally, WebP on the web, HEIC only inside Apple's garden. Graphics belong in lossless ones — PNG for pixels, SVG for shapes. GIF earns its keep only in tiny animations, and AVIF is worth watching but not yet worth standardizing on. Get that mapping right and file size becomes a separate, entirely solvable problem — one setting and one resize away.
Related: How to compress images for the web without losing quality · What your photos reveal: EXIF data, GPS and how to remove them · Browse all tools