The wrong image format can make a file far bigger than it needs to be, or remove a transparent background you were relying on. Here's what each of the three most common formats is good at, and a simple way to decide.
The short answer
| Use | When |
|---|---|
| JPG | Photos, especially when the file must open anywhere |
| PNG | Screenshots, logos, diagrams, graphics with text, and anything that must stay pixel-perfect |
| WebP | Images on websites, where smaller files make pages load faster |
JPG (also written JPEG)
JPG has been the standard format for photos since the early 1990s. It uses lossy compression: it discards fine detail that the eye is unlikely to notice, which makes photo files small.
- Strengths: small files for photos, and it opens in practically every app, browser and device.
- Weaknesses: no transparency, and sharp edges and text can get fuzzy halos. Every time a JPG is edited and saved again, a little more quality can be lost.
PNG
PNG was created in the mid-1990s as an open replacement for GIF. Its compression is lossless: the image you open is exactly the image that was saved, pixel for pixel.
- Strengths: perfect for screenshots, logos, icons, charts and anything with text. It supports full transparency, including partly see-through pixels such as soft shadows.
- Weaknesses: photos saved as PNG are usually much larger than the same photo as JPG or WebP, with no visible benefit.
WebP
WebP is a newer format developed by Google. It can work in either a lossy mode (like JPG) or a lossless mode (like PNG), and it supports transparency and animation. All major modern browsers support it, including Chrome, Edge, Firefox and Safari.
Its main advantage is size. Google, which created the format, reports that lossless WebP images are about 26% smaller than PNGs, and lossy WebP images are 25–34% smaller than comparable JPGs. Real results vary from image to image.
- Strengths: smaller files for both photos and graphics, with transparency.
- Weaknesses: some older software, email programs and upload forms still don't accept WebP. If a website rejects your file, convert it to JPG or PNG.
What happens to transparency?
A transparent background lets whatever is behind the image show through, which is common for logos placed on colored backgrounds. PNG and WebP keep transparency. JPG can't store it, so when you convert to JPG the transparent areas must be filled with a solid color, usually white. If you need the background to stay see-through, don't use JPG.
Does converting improve quality?
No. Converting a JPG to PNG won't bring back detail that JPG compression already removed. The PNG will look the same as the JPG, but the file will usually be bigger. Converting from one lossy format to another (JPG to WebP, for example) can lose a little more detail. For the best result, always convert from the highest-quality original you have.
A simple way to decide
- Does it need a transparent background? Use PNG or WebP.
- Is it a photo? Use JPG for maximum compatibility, or WebP for the smallest file on a website.
- Is it a screenshot, logo or graphic with sharp edges or text? Use PNG, or WebP at high quality.
- Not sure where it will end up? JPG for photos and PNG for graphics are the safest choices.
Other formats you might come across
- GIF: an old format still used for short, simple animations. It's limited to 256 colors per frame, so photos look grainy.
- HEIC: the format many iPhones use for photos. It's efficient, but many websites and Windows programs don't accept it. Convert to JPG before sharing widely. (Our converter doesn't support HEIC yet.)
- AVIF: a newer, very efficient format with growing support in browsers and apps.
- SVG: not made of pixels at all. It describes shapes, so logos and icons stay sharp at any size. It isn't suitable for photos.
Want smaller files without changing format? See how to compress an image without losing too much quality.