Pick the wrong image format and nothing visibly breaks: the image still shows up. It's just three times heavier than it needs to be, or it has a fuzzy halo around the logo, or the transparent background has turned white. Most of these problems come from not knowing what each format is actually good at. Here's the practical version.
The one-paragraph answer
Use JPG for photographs when you need maximum compatibility. Use PNG for screenshots, logos, diagrams and anything with transparency or sharp text. Use WebP for nearly everything on a website, because it does both jobs at a smaller size and every current browser supports it. The rest of this guide explains why, and where those rules bend.
How each format compresses
JPG (JPEG): built for photos
JPEG dates from 1992 and is still the most widely supported image format in existence. It compresses by throwing away detail the human eye is bad at noticing. The image is split into 8×8 pixel blocks, each block is converted into frequencies, and the fine, high-frequency detail is stored with less precision. Colour information is also stored at a lower resolution than brightness, because our eyes are more sensitive to light than to hue.
On a photo of a landscape, you won't notice any of this at a quality setting of 80. On a screenshot full of text, you will: those 8×8 blocks produce faint ripples ("ringing") around every hard edge. JPEG also has no transparency at all, so a transparent area has to be filled with a solid colour.
PNG: lossless, for graphics
PNG never discards information. Every pixel you save is exactly the pixel you get back. It compresses by finding repetition: long runs of the same colour, repeating patterns, predictable rows. That works brilliantly for flat-colour graphics. A screenshot of a code editor or a logo on a transparent background can be tiny as a PNG.
Photos are the opposite case. Natural images have almost no exact repetition (every pixel differs slightly from its neighbour), so a PNG photo is typically several times larger than a good-looking JPEG of the same picture. If you've ever had a phone screenshot of a photo come out at 8 MB, this is why.
WebP: the modern all-rounder
WebP was released by Google in 2010, and its lossy mode is based on the VP8 video codec. It has two modes: lossy, which competes with JPEG, and lossless, which competes with PNG. Both support transparency. Google's own published studies found lossy WebP files 25–34% smaller than JPEGs of comparable quality, and lossless WebP about 26% smaller than PNG. Real-world results vary with the image, but that range matches what most people see in practice.
For years the catch was browser support. That's no longer an issue: Safari added WebP in 2020, and every current browser handles it. The remaining gaps are outside the browser, in some older desktop software, print services and upload forms that still only accept JPEG or PNG.
Side by side
| JPG | PNG | WebP | |
|---|---|---|---|
| Compression | Lossy | Lossless | Lossy or lossless |
| Transparency | No | Yes | Yes |
| Animation | No | Via APNG | Yes |
| Best for | Photos | Graphics, text, screenshots | Both, on the web |
| Support | Universal | Universal | All modern browsers; patchy in older apps |
Typical file sizes
Exact numbers depend heavily on the image, but the pattern is consistent enough to plan around. For a typical 12-megapixel phone photo:
- As it comes off the camera (high-quality JPEG): roughly 2–5 MB.
- Re-saved as JPEG at quality 80: often well under half that, with no visible difference on screen.
- As lossy WebP at similar visual quality: around a quarter to a third smaller again.
- As PNG: commonly 15–25 MB. Lossless storage of a photo is expensive.
For a screenshot of a web page, the order flips. PNG is usually small and crisp, JPEG is similar in size but smudges the text, and lossless WebP beats both.
The bigger lesson: dimensions matter more than format. A 4000-pixel-wide photo displayed at 1200 pixels is carrying about eleven times more pixels than anyone will see. Resizing it first, then picking the format, gives far larger savings than agonising over JPEG vs WebP.
So which should you pick?
For a website
WebP for almost everything: photos at quality 75–85, graphics in lossless mode or at high quality. If you want to squeeze further, AVIF is newer and usually smaller still, but it's slower to encode and some tools don't support it yet. Most frameworks (Next.js, Astro, WordPress with a plugin) can serve WebP or AVIF automatically from your originals.
For email, documents and sharing
JPEG for photos and PNG for screenshots. Not every recipient's software opens WebP, and the person on the other end shouldn't have to convert anything.
For logos and icons
SVG if you have a vector version, since it's sharp at every size and usually tiny. Otherwise PNG, or WebP for the web. Never JPEG: the transparency disappears and the edges blur.
For editing
Keep a lossless master (PNG, TIFF or your editor's own format) and export a JPEG or WebP at the end. Every time a JPEG is opened and re-saved, it loses a bit more quality, so don't use it as a working format.
Common mistakes
- Converting JPG to PNG to "improve quality". The detail is already gone; you only get a bigger file.
- Saving logos as JPEG. You lose the transparent background and get grey fringes around the edges.
- Uploading phone photos at full resolution. Resize to the display size first.
- Serving one huge image to every device. Use
srcsetso phones download a smaller version. - Recompressing over and over. Always export from the original, not from the last compressed copy.
Try it on your own images
The quickest way to build intuition is to take one of your own images and save it all three ways. Our Image Converter does that in the browser without uploading anything. Then compare the files with the Image Compressor at a few quality levels. Five minutes of that teaches you more than any table.