The short version
- A photograph going anywhere you do not control — JPG.
- Anything with a transparent background — PNG, or WebP if it is for a website.
- A screenshot with text in it — PNG.
- Images on a web page you own — WebP.
- A file you will keep editing — PNG, and export a JPG at the end.
- Something that has to animate — not an image at all. Use a video file.
If that answers your question, stop here. The rest explains why, and what happens when you pick wrong.
The two questions that decide it
Almost every format decision comes down to two properties:
Does it need transparency? JPEG has no alpha channel and never will. If any part of your image should let the background show through — a logo, an icon, a cut-out product shot — JPEG will fill it with white and there is no way to get it back. That single fact eliminates JPEG for a large class of images regardless of anything else.
Is it a photograph or is it graphics? Photographs are continuous tone: soft gradients, no hard edges, millions of subtly different colours. Graphics are the opposite: flat areas of solid colour with sharp boundaries. Lossy formats like JPEG were designed for the first and handle the second badly, producing visible smudging around every hard edge. Lossless formats like PNG do the reverse — they store graphics very efficiently and photographs very inefficiently.
Get those two right and the choice usually makes itself.
Format by format, honestly
JPEG — the universal currency
Thirty years old, understood by literally everything, and small. It is lossy, has no transparency, and degrades slightly every time you re-save it. None of that matters for its actual job: getting a photograph to someone else reliably.
Use it when the receiving end is unknown or old — upload portals, email attachments, print shops, government forms. If a form names a format at all, it names this one.
Avoid it for transparency, screenshots, text, line art, and any file you plan to edit repeatedly.
PNG — lossless and honest
Stores every pixel exactly, supports full alpha transparency, and never degrades no matter how many times you open and save it. The cost is size: a photograph saved as PNG is commonly five to ten times larger than the same photograph as JPEG, for a difference almost nobody can see.
Use it when you need transparency, when the image contains text or sharp edges, or when the file is a working master you will keep editing.
Avoid it for photographs you are simply sending somewhere. You are paying a large size penalty for precision the content does not need.
WebP — the modern default for the web
Roughly 25–35% smaller than JPEG at comparable quality, and it supports transparency, which makes it the only format that does both jobs well. Every current browser reads it.
Use it when the image is going on a web page you control. Smaller images mean faster pages, and page speed feeds into search ranking.
Avoid it when the file leaves the browser. Desktop software, print workflows, older applicant-tracking systems and plenty of government portals still reject it outright. If you cannot verify what will open the file, send JPG.
AVIF — better still, supported less
Compresses more efficiently than WebP and supports transparency and high dynamic range. The catch is the same as WebP's, one step worse: browser support arrived well before desktop support, so the image your browser displays perfectly may be unopenable in your image editor.
Use it when you are optimising a website and can serve a fallback. Avoid it everywhere else for now.
HEIC — what your phone gives you
Not a choice you make; a choice Apple made for you. It is efficient — roughly half the size of JPEG at the same quality — and almost nothing outside Apple's ecosystem reads it. You will mostly encounter it as a problem to solve rather than a format to pick.
If it is causing you trouble, the fix is converting it to JPG. If you would rather it stopped happening, change it at the source: on iPhone, Settings → Camera → Formats → Most Compatible saves as JPEG from then on.
GIF — a legacy format, not a choice
256 colours per frame, which is why photographs saved as GIF look speckled and banded. Its one genuine feature is animation, and even there a short video file is smaller and looks better. For a still image, PNG beats it on every measure.
The mistakes worth avoiding
Converting JPG to PNG to "improve" it. The most common misconception in this whole subject. PNG stores exactly what it is given — which here is an image JPEG has already compressed. You get a much larger file containing precisely the same flaws. Nothing recovers discarded detail.
Using PNG for photographs on a website. This is a common cause of pages that take ten seconds to load. A gallery of PNG photographs can easily be twenty times larger than it needs to be.
Using JPEG for screenshots. The text goes fuzzy. Screenshots are graphics, not photographs — the whole point is that the text is readable, and JPEG's smoothing attacks exactly the hard edges that make it readable.
Converting back and forth between lossy formats. Every hop discards more detail permanently. Convert once, from the original.