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).
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.