Images
JPG vs PNG vs WebP: Which Image Format to Use
JPG, PNG or WebP? A practical guide to what each format does best, with simple rules for photos, logos, screenshots and website images.
- ToolsBench Team
- 5 min read
Picking an image format feels like it should not matter, until your site is slow, or your logo has a white box around it where transparency should be. Here is how the three most common formats actually differ, and how to choose without overthinking it.
The core idea: lossy versus lossless
Image formats compress in one of two ways. Lossy compression throws away some detail the eye is unlikely to notice, in exchange for much smaller files. Lossless compression shrinks the file without discarding anything, so the image can be restored exactly. That single distinction explains most of the differences below.
JPG: photos and anything with lots of color
JPG (also written JPEG) is lossy. That is a great trade for photographs, where you have millions of subtly different colors and a viewer who will not notice a little smoothing.
What JPG is bad at: sharp edges, text, and flat areas of solid color. Save a screenshot or a logo as JPG and you will often see fuzzy halos around hard edges. JPG also has no transparency, so a transparent area becomes a solid color, usually white.
One more thing to know: every time you open a JPG, edit it, and save it as JPG again, it is re-compressed and loses a little more quality. Keep an original and export copies.
Use JPG for: photos, complex illustrations, and anything headed for email or a layout where file size matters.
PNG: transparency and sharp edges
PNG is lossless and supports transparent backgrounds, including partial transparency for soft shadows. That makes it the right choice for logos, icons, screenshots, diagrams, and images with text on them.
The trade-off is size. A PNG of a photograph is commonly several times larger than a JPG of the same picture, usually with no visible quality benefit. PNG shines where there are big areas of flat color, which compress very well.
Use PNG for: logos, icons, UI screenshots, charts, and graphics that need a transparent background.
WebP: smaller files, with a few compatibility caveats
WebP can work in both modes. It offers lossy compression like JPG and lossless compression like PNG, and it supports transparency. At comparable visual quality, WebP files are generally smaller than the equivalent JPG or PNG, though how much smaller depends on the image.
Current versions of all major browsers display WebP. The caveats are elsewhere: some older email clients, desktop programs, print workflows, and upload forms may not accept it, and people sometimes get stuck when they save a WebP from a website and cannot open it in an older app.
Use WebP for: images on your own website where load speed matters and you control how they are delivered.
How to decide
- Photo on a website: WebP, or JPG if you want maximum compatibility with no extra work.
- Logo, icon, or screenshot: PNG, or lossless WebP if you only serve it to browsers.
- Anything emailed, printed, or sent to software you do not control: JPG or PNG.
- Needs transparency: PNG or WebP. Never JPG.
- Unsure: try two options and compare file size and appearance. Zoom in on edges and text, not just the overall picture.
Converting between formats
Our converters run in your browser, so the image does not need to be uploaded. If you need a transparent-capable format from a JPG, JPG to PNG will do it, though note that converting a JPG to PNG cannot restore detail the JPG already lost, and it will not add transparency by itself. To shrink web graphics, PNG to WebP keeps transparency while reducing size. If you want one place to switch between the three, use the image format converter.
To reduce the size of an existing image, the image compressor has a quality slider. For PNG files it re-encodes to WebP, since a quality setting does not do anything for lossless PNG, and it keeps your original if it cannot make the file smaller.
Common mistakes
- Using PNG for photographs. This is the most common cause of slow pages. Photos are almost always better as JPG or WebP.
- Using JPG for logos or screenshots. Text and edges get blurry or noisy. Use PNG.
- Converting JPG to PNG and expecting better quality. The detail was already discarded. The file will often just get bigger.
- Repeatedly re-saving the same JPG. Quality erodes with each lossy save. Work from the original.
- Ignoring dimensions. A 6000-pixel-wide photo displayed at 800 pixels wastes bandwidth in any format. Resize first with the image resizer, then compress.
Quick answers
Is WebP better than JPG?
For file size at similar quality, usually yes. For compatibility with older software, JPG is still the safest choice. If you serve images to modern browsers, WebP is a good default.
Can I make a JPG transparent?
No, the format does not support it. Use PNG or WebP, and remember that a JPG converted to either format will not gain transparency automatically. You would need to remove the background in an editor.
Why is my PNG so big?
Lossless compression keeps every pixel exactly, and photographs contain a huge amount of fine variation. If it is a photo, convert it to JPG or WebP. If it is a graphic, reducing its dimensions or colors can help.
Which format is best for a website logo?
If it is a flat graphic, PNG is a dependable choice. SVG (a vector format) is often even better for simple logos because it stays sharp at any size, though that is a different type of file from the three discussed here.
Keep reading
More on Images
- Images
How QR Codes Work and Why Some Won't Scan
QR codes look like noise, but every square has a job, including repairing damage. Learn how they work and how to fix a code that won't scan.
6 min read
- Images
HEIC vs JPG: How to Open iPhone Photos on Windows
iPhones save photos as HEIC, which many Windows apps and websites still can't open. Here's what HEIC is, why Apple uses it, and how to turn it into a JPG in seconds.
3 min read