The one-sentence version
Use JPEG for photos, PNG for anything with sharp edges, text, or transparency (logos, screenshots, graphics), and WebP when you want the smaller file size of a modern format and don't need to support very old software.
Why the same rule doesn't apply to everything
JPEG and PNG compress images in fundamentally different ways, which is why picking the wrong one for the wrong content produces bad results. JPEG throws away detail a human eye is less likely to notice — subtle color gradients, fine texture — which works brilliantly on photos full of that kind of detail, but creates visible blotchy artifacts around sharp edges and text, because there's nothing "unnoticeable" to discard there. PNG instead compresses without losing any detail at all, which is exactly why it handles screenshots, logos, and line art cleanly, but produces much larger files for photos than JPEG would for the same image.
Side by side
| Format | Best for | Transparency? | Typical file size |
|---|---|---|---|
| JPEG | Photos, complex real-world images | No | Small |
| PNG | Screenshots, logos, graphics, anything needing transparency | Yes | Larger |
| WebP | Either — modern replacement for both | Yes | Smallest |
WebP was built specifically to replace both older formats with something smaller at an equivalent visual quality, and it supports transparency too. The tradeoff is compatibility — it's supported by every major browser now, but older software (some email clients, older design tools, some printers) may not open it, which is worth checking before it becomes your only copy of something important.
When compressing actually helps
Compression reduces file size by discarding some data — for JPEG, that means reducing detail (quality); for PNG, it means more efficient encoding without losing any detail. Compressing helps a lot when a file is going somewhere size-sensitive: a website (faster page loads), an email attachment (avoiding size limits), or a messaging app. It generally doesn't help — and can hurt — when you're archiving the master copy of something you might want to edit or print later at full quality, since JPEG compression especially is lossy and compounds each time you re-save it.
A practical habit: keep an uncompressed or lightly-compressed master copy for anything you might reuse, and generate a compressed version specifically for wherever it's actually going (a website, a social post, an attachment).
Which format for what
- Photographs: JPEG for the widest support, or WebP and AVIF when your page and audience can handle them and you want smaller files.
- Logos and icons: SVG when you can, because it stays sharp at any size and is tiny. PNG if you need a raster version.
- Screenshots and text: PNG, which keeps edges crisp. JPEG can leave fuzzy marks around letters.
- Transparent images: PNG or WebP. JPEG has no transparency.
- Animation: short video or WebP is usually far smaller than a GIF.
Quality settings
For JPEG and WebP, a quality of around 75 to 85 is a good balance for photographs. Below about 60, blocks and smudges start to show, and above about 90 the file grows a lot for little visible gain. Always keep your original, because every re-save of a lossy file loses a little more.
Size on the page
Format is only half of it. A photo taken at 4000 pixels wide and shown at 800 pixels carries many times more data than it needs. Resize to the largest size the page will actually show, then compress. For sharp screens, provide an image about twice the displayed width, not ten times.
Common questions
Will WebP work everywhere? All current major browsers support it, but some older software and email programs do not, so keep a JPEG for sharing by email.
Why is my PNG so big? PNG is lossless and is best for flat colours. A photograph saved as PNG can be many times larger than the same one as JPEG.
Does compression remove my metadata? Often, yes. That includes camera and location data, which is useful if you do not want to share them.
Try it yourself
The Image Compressor handles JPG, PNG, and WebP — adjust quality, resize, and convert between formats all in one place. If you specifically need to convert between formats (including HEIC from an iPhone) without necessarily compressing, the Image Format Converter does that directly.