Lossy vs lossless: the idea behind every format
Before the individual formats, it helps to understand the one distinction that shapes them all. A lossy format throws away some detail to make the file smaller, usually detail your eye struggles to see. A lossless format keeps every pixel exactly as it was, so the file is larger but perfectly faithful. Some formats are strictly one or the other; the newer ones can do both. If you want the full story, our dedicated explainer on lossless vs lossy compression goes deeper. With that in mind, here is each of the main formats you are likely to meet.
JPEG (JPG)
JPEG is the workhorse of digital photography and has been since the 1990s. It is a lossy format tuned for photographs, where smooth gradients and millions of colours compress beautifully. The catch is that it does not support transparency and it struggles with sharp edges, so text and line art can look fuzzy or develop halos around them. It is a fine choice for photographs when file support is the priority, but for the web a converted WebP will almost always be smaller at the same visible quality. See our tips on compressing JPG files for the details.
PNG
PNG is a lossless format built for graphics rather than photos. It handles transparency superbly, keeps text and edges razor sharp, and never introduces the blocky artefacts that lossy compression can. That fidelity comes at a price: PNG files of photographs are enormous. Use PNG for logos, icons, screenshots and anything that needs a transparent background, though, again, WebP can hold the same transparency in a far smaller file. Our guide to compressing PNG images covers how to trim them down.
GIF
GIF is the old favourite for short, looping animations. It is lossless but limited to a palette of just 256 colours, which makes photographs look banded and dull. For simple animations and tiny graphics it still works, but modern formats produce smaller, richer results. Where you once reached for a GIF, an animated WebP or a short video will usually serve you better.
WebP
WebP is the modern all-rounder from Google, and the reason this site exists. It supports both lossy and lossless modes, full transparency and animation, all in one format. A WebP photo is typically 25–35% smaller than a JPEG, and a WebP graphic can be less than half the size of a PNG, with no visible quality loss. It is supported by every current browser, which is why we recommend it as your default. You can convert almost anything to WebP with our free tool, and the WebP vs JPG vs PNG comparison shows the savings in context.
AVIF
AVIF is the newest contender, based on the AV1 video codec. At low file sizes it can beat even WebP, preserving detail in very small files, and it supports transparency, animation and a wide colour range. Its trade-offs are slower encoding and browser support that, while good, is not yet as universal as WebP's. AVIF is an excellent choice when you want the very smallest files and can generate them ahead of time; exporting to AVIF is on our roadmap.
TIFF, BMP and SVG
TIFF is a professional, lossless format used in printing and archiving. It preserves maximum quality and metadata, but the files are huge and browsers do not display it, so it belongs to editing and print workflows rather than the web. BMP is an old, uncompressed bitmap format: simple, but wastefully large with no real advantage today. SVG is different from everything else here: it is a vector format made of maths rather than pixels, so it scales to any size without blur. SVG is perfect for logos, icons and illustrations, but it cannot represent a photograph. When you need a fixed pixel image from vector art, you can rasterise it to WebP.
Comparison at a glance
| Format | Type | Transparency | Animation | Best for |
|---|---|---|---|---|
| JPEG (JPG) | Lossy | No | No | Photographs |
| PNG | Lossless | Yes | No | Logos, screenshots, transparency |
| GIF | Lossless (256 colours) | Yes (1-bit) | Yes | Simple short animations |
| WebP | Lossy or lossless | Yes | Yes | Almost everything on the web |
| AVIF | Lossy or lossless | Yes | Yes | Smallest files, modern sites |
| TIFF | Lossless | Yes | No | Print & archiving |
| BMP | Uncompressed | Optional | No | Legacy / raw bitmaps |
| SVG | Vector (lossless) | Yes | Yes (via animation) | Icons, logos, illustrations |
The best image format for the web
For most websites the honest answer is straightforward: use SVG for logos and icons where you have vector artwork, and use WebP for everything else. WebP replaces JPEG for your photographs and PNG for your graphics, gives you transparency and animation when you need them, and produces smaller files than either, which means faster pages, better Core Web Vitals and a lighter load for mobile visitors. AVIF is worth adopting on top for the very smallest files once your workflow allows it.
Standardising on one format also removes a surprising amount of day-to-day friction: fewer decisions, consistent results, and one predictable pipeline for every image on the site. You do not need expensive software to make the switch. Our free tool converts JPG, PNG, GIF, AVIF, TIFF, BMP and SVG to WebP entirely in your browser. Nothing is uploaded, there is no sign-up, and it is free forever. If you are new to it, the how-to-compress-images guide shows the whole process, or you can simply open the compressor and try it with your own files.