Which image format to use

Most format confusion comes from treating a handful of independent questions as one. Is the compression lossy or lossless? Can it store transparency? Can it hold more than one image? How much software can open it? Nearly every "which format should I use" answer falls out of those four, and the answers differ per format in ways the extension does not hint at.

Lossy or lossless

Lossless — PNG, BMP, TIFF and lossless WebP — means the file stores exactly the pixels it was given. Save it a hundred times and it is identical. It also means the file cannot be small if the image is complicated, because there is no way to make a photograph small without discarding something.

Lossy — JPEG, AVIF, and lossy WebP — means the encoder discards detail chosen to be hard to notice. This is how a 12-megapixel photograph becomes 2 MB instead of 36. The critical property is that it compounds: each lossy save discards more, and none of it comes back.

The practical rule: work in a lossless format, export to a lossy one, and never edit the export.

Transparency

PNG, WebP, AVIF and ICO all store a full eight-bit alpha channel, so a pixel can be any degree of transparent and edges can be smooth. TIFF can, when the file declares it. BMP can in its 32-bit form, though support for reading it is inconsistent enough to be risky.

JPEG cannot, at all. This is the single most consequential difference in everyday use: converting a logo to JPEG destroys the cut-out permanently, and the only question is what colour goes where the transparency was. GIF has one-bit transparency — a pixel is either fully visible or fully invisible — which is why GIF logos have jagged edges.

What each format is actually for

PNG — screenshots, diagrams, logos, interface assets, and anything mid-edit. Lossless, transparent, universal. Large for photographs.

JPEG — photographs going anywhere at all. Nothing refuses it. No transparency, and bad at text and hard edges.

WebP — the sensible modern default for the web. Does everything JPEG and PNG do, smaller, with transparency, and is supported by every current browser. Still refused by a long tail of desktop software.

AVIF — the smallest files at a given quality, and the best at gradients and dark areas. Slow to encode and the least widely supported. Best for photographs on a site you control.

TIFF — scanning, print and archival work. No browser displays it. Enormously variable, which is why so much software only partially supports it.

BMP — uncompressed, ancient, and read by literally everything. Convert to it only when something specifically demands it.

ICO — Windows icons and favicons. A container of several sizes of the same image rather than a format in its own right.

GIF — obsolete for still images; PNG is better in every respect. Still relevant for short animations, though even there video formats are smaller.

Camera raw — CR2, CR3, NEF, ARW, DNG, RAF, ORF, RW2 and a long tail besides. Not an image format at all: sensor readings plus the calibration data needed to interpret them. Keep the raw files; convert copies when you need pictures.

Camera raw is a different kind of thing

Every format above holds a picture: a grid of colours, however it is compressed. A raw file holds one brightness reading per photosite behind a coloured filter, so each position has measured one colour and not the other two. Producing an image means interpolating the missing ones from the neighbours, applying the white balance the camera recorded, mapping the sensor's primaries through a matrix measured for that exact camera model, and applying a tone curve.

That is why raw files are worth keeping and why they are awkward to use. They hold twelve or fourteen bits per channel where a JPEG holds eight, and they leave every one of those decisions open, which is exactly what makes a raw editor able to recover a sky the camera clipped. It is also why almost nothing outside photo software will open one.

Converting raw here decodes the sensor data properly and writes an ordinary image. What it does not do is develop the photograph — no exposure adjustment, no lens corrections, no manufacturer picture styles — so the result is neutral and faithful rather than finished. Each format has its own page explaining what is specific to it.

Converting between them: what to expect

Lossy to lossless (JPEG to PNG, AVIF to PNG): the file gets larger, often much larger, and nothing improves. Worth doing before editing, not otherwise.

Lossless to lossy (PNG to JPEG, PNG to AVIF): the file gets much smaller and some detail goes. Worth doing for export.

Lossy to lossy (JPEG to WebP, AVIF to JPEG): a second compression pass whose losses add to the first. Keep the quality high.

Anything to BMP: much larger, no compression, maximum compatibility.

Anything with transparency to JPEG: the transparency is gone permanently. Choose the background colour deliberately.

What this tool will not convert, and why

HEIC and HEIF, the format iPhones use by default — only Safari can decode these, and a browser-based converter that works in one browser is not a converter. Adding it would mean shipping an HEVC decoder several megabytes larger than everything else here combined. On an iPhone, Settings → Camera → Formats → Most Compatible makes the camera write JPEG instead, which sidesteps the problem entirely.

Photoshop PSD — a layered document rather than an image. Flattening one correctly means implementing blend modes, adjustment layers, masks and smart objects, and anything less produces a picture that does not match what you see in Photoshop.

SVG — vector artwork with no inherent pixel size, and rasterising untrusted SVG in a browser means executing its scripts and following its external references. Doing that safely needs a sandbox this site does not have.

PDF — a document format that needs a full rendering engine.

Each of these is recognised on sight and refused with the reason, rather than failing with an unhelpful error.

Related