Formats

JPG vs PNG vs WebP: which format should you use?

Three formats, three different jobs. We saved the same images in all three and measured the results, so you can pick the right one for photos, screenshots, logos and websites in under a minute.

By DockFlip Team11 min readUpdated
JPG WebP PNG
Quick answer

Use JPG for photos you send, upload or print, because it works everywhere. Use PNG for screenshots, logos and graphics that need sharp edges or a transparent background. Use WebP for images on a website, because it makes both kinds of image smaller. In our test WebP photos were 22–34% smaller than JPG. If a site or app will not accept WebP, convert it with WebP to JPG.

JPG vs PNG vs WebP: the difference at a glance

JPG (JPEG)PNGWebP
CompressionLossyLosslessLossy or lossless
File size for photosSmallVery largeSmallest
File size for screenshots and graphicsMedium, with fuzzy edgesMediumSmallest
Transparent backgroundNoYesYes
AnimationNoNot in normal useYes
Opens in every app and websiteYesYesMost, not all
Accepted by upload formsAlmost alwaysUsuallySometimes
Best forPhotos to share, upload and printScreenshots, logos, cut-outs, editingWebsite images

Lossy means the format throws away some detail to make the file smaller. You choose how much with a quality setting. Lossless means every pixel is kept exactly, so the image looks identical but the file is bigger.

JPG: the safe choice for photos

JPG (also written JPEG, the same format) has been the standard photo format since the early 1990s. Its compression is designed for natural scenes, where small changes in colour are hard for the eye to see. That is why a 12-megapixel phone photo, about 36 MB of raw pixel data, can be saved as a JPG of a few megabytes and still look the same.

Use JPG when:

  • You are sending a photo by email or chat, or uploading it to a form, a marketplace or a print shop.
  • You do not know what the other person or website can open. JPG works in every browser, phone, computer, printer and editor.
  • The image is a photo, with no text or sharp lines.

Avoid JPG when: the image has text, thin lines or flat colours, such as screenshots, logos and charts. JPG compression adds faint smudges, called artifacts, around sharp edges. JPG also has no transparency, so a cut-out saved as JPG gets a solid background. And every time you edit and re-save a JPG, it loses a little more quality.

PNG: sharp edges and transparency

PNG is lossless. Each pixel is stored exactly, so text, lines and flat colours stay perfectly crisp, and the image never degrades when you save it again. PNG also supports transparency, which is why logos, icons and product cut-outs are usually PNG.

Use PNG when:

  • The image is a screenshot, a diagram, a chart, a logo or an icon.
  • You need a transparent background, for example a logo placed on a coloured slide.
  • You are going to edit the image several times and want no quality loss along the way.

Avoid PNG for photos. Because it keeps every pixel, a photo saved as PNG is often 5 to 10 times larger than the same photo as JPG, with no visible benefit. If you have a photo that ended up as PNG, PNG to JPG fixes it in seconds.

WebP: smaller files for the web

WebP is a newer format created by Google for the web. It can work in two modes. Lossy WebP competes with JPG and makes photos smaller at similar quality. Lossless WebP competes with PNG and keeps every pixel. Both modes support transparency, and WebP can also be animated like a GIF.

Google's own figures say lossless WebP images are about 26% smaller than PNG, and lossy WebP images are 25–34% smaller than comparable JPGs. Every major browser, including Chrome, Edge, Firefox and Safari, now shows WebP.

Use WebP when:

  • The image goes on a website, an online store or a blog. Smaller images make pages load faster.
  • You want a small file that also keeps a transparent background.

Avoid WebP when: you are uploading to a form, sending to a print shop, or sharing with someone who may use older software. Support outside browsers is good but not universal yet. More on that below.

We tested it: the same images in all three formats

To check the claims, we saved the same images in each format and measured the file sizes. Photos were standard test photographs. The screenshot is a 1366 × 900 page from this website, the illustration is a 1200 × 630 flat-colour graphic, and the logo has a transparent background. JPG and lossy WebP were saved at quality 80, using the common libjpeg and libwebp encoders.

ImagePNGJPG (80)WebP (80)WebP lossless
Photo: portrait, 512 × 512412 KB44 KB29 KB327 KB
Photo: coffee cup, 600 × 400431 KB46 KB36 KB329 KB
Photo: cat, 451 × 300214 KB23 KB16 KB150 KB
Photo: rocket, 640 × 427295 KB31 KB22 KB242 KB
Screenshot, 1366 × 900154 KB106 KB60 KB48 KB
Illustration, 1200 × 63064 KB44 KB23 KB32 KB
Logo with transparency, 551 × 13638 KB6 KB, transparency lost12 KB26 KB

What the numbers show:

  • Photos: PNG was about 9 times larger than JPG. WebP was 22–34% smaller than JPG, in line with Google's figures.
  • Screenshots: lossless WebP was a third of the PNG size with no quality loss at all. JPG was smaller than PNG but blurred the text.
  • Logos: JPG looks tiny, but it dropped the transparent background, so it is not a real option. WebP kept the transparency at a third of the PNG size.

Your results will differ with each image, and quality 80 in JPG is not exactly the same visual quality as 80 in WebP. The pattern, though, holds for almost every image.

Which format should you use? Pick by job

What you are doingBest formatWhy
Sending photos by email or WhatsAppJPGOpens on every device
Uploading to a form, portal or job siteJPGThe format forms accept most often
Printing photosJPG at high qualityPrint shops expect it
Screenshots to share or put in documentsPNGText stays sharp
Logos and iconsPNG, or SVG if you have itTransparency and crisp edges
Product photos with no backgroundPNG to edit, WebP for the websiteTransparency in both
Images on your website or blogWebPSmallest files, faster pages
Images you will keep editingPNGNo loss each time you save
Short animationsWebP (or a video file)Much smaller than GIF

Best image format for websites and SEO

For a website, WebP is the best default today. Images are usually the heaviest part of a page, and lighter images help pages load faster, which visitors notice and search engines measure. Tools such as Google PageSpeed Insights often flag JPG and PNG images with a suggestion to "serve images in next-gen formats", meaning WebP or AVIF.

A few rules make the biggest difference:

  • Convert photos and graphics to WebP. Image to WebP converts JPG and PNG files in your browser, and keeps transparency.
  • Resize before you upload. A 4000 px photo shown 800 px wide wastes most of its bytes, whatever the format. Resize Image sets the exact width.
  • Write good file names and alt text. red-running-shoes.webp with the alt text "red running shoes, side view" helps image search far more than IMG_2041.webp.
  • Keep a JPG or PNG master copy. Edit the master, then export a fresh WebP. Do not edit and re-save the WebP again and again.

Most website builders and content management systems now accept WebP uploads, and many convert images to WebP for you. Check your platform's settings before converting by hand.

When WebP causes problems, and how to fix them

WebP works almost everywhere online, but you can still run into it as a nuisance. The most common case: you save an image from a website, and it downloads as .webp when you expected a JPG.

  • A form or website rejects the file. Many upload forms only accept JPG or PNG. Convert with WebP to JPG for photos, or WebP to PNG if the image has a transparent background.
  • An older app will not open it. Recent versions of Windows Photos, macOS Preview and Photoshop open WebP, but older editors, some email clients and some office software may not. Converting to JPG or PNG solves it.
  • A print shop asks for another format. Send a high-quality JPG, or a PNG for graphics.
WebP to JPG converterFree. No signup. No watermark. Files stay on your device.
Convert WebP to JPG

What about AVIF, HEIC, GIF and SVG?

AVIF

AVIF is an even newer format that often makes photos smaller than WebP at the same quality. Modern browsers support it, but it takes longer to encode and fewer apps can open it. If you have an AVIF file that will not open, AVIF to JPG converts it.

HEIC

HEIC is the format iPhones use for photos by default. It is small and good quality, but Windows and many websites cannot open it without help. See our guide on how to open HEIC files on Windows, or convert with HEIC to JPG.

GIF

GIF is limited to 256 colours, so it is a poor choice for photos. It survives mainly for short animations, where animated WebP or a small video file is usually much lighter.

SVG

SVG is different: it stores shapes, not pixels, so it stays sharp at any size and is often tiny. It is ideal for logos and icons on websites, but it cannot hold a photo. When you need a regular image from an SVG, use SVG to PNG.

How to convert between JPG, PNG and WebP

All of these run in your browser. Your images are not uploaded, and you can convert several files at once.

You haveYou needTool
PNG photo that is too bigJPGPNG to JPG
JPG that you want to edit without further lossPNGJPG to PNG
JPG or PNG for a websiteWebPImage to WebP
WebP that will not open or uploadJPGWebP to JPG
WebP with a transparent backgroundPNGWebP to PNG

One thing to know: converting a JPG to PNG does not bring back detail that JPG compression already removed. It only stops further loss from here on. And if the converted file is still too heavy, our guide on how to reduce image size explains how to hit a size limit such as 100 KB.

Frequently asked questions

Which is better, JPG or PNG?

Neither is better overall. JPG is better for photos because the files are much smaller and open everywhere. PNG is better for screenshots, logos and graphics because it keeps sharp edges and supports transparent backgrounds.

Is WebP better than JPG?

For websites, usually yes. WebP photos are typically 25 to 34% smaller than JPG at similar quality, and WebP also supports transparency and animation. For uploading to forms, printing or sharing with people using older software, JPG is still the safer choice.

Is WebP better than PNG?

For website graphics and screenshots, yes. Lossless WebP keeps every pixel like PNG but is usually around a quarter smaller, and in our screenshot test it was about a third of the PNG size. PNG is still better when an app, form or editor does not support WebP.

Does converting JPG to PNG improve quality?

No. Converting a JPG to PNG cannot bring back detail that JPG compression already removed. It only prevents more loss if you edit and save the image again.

Why do images download as WebP from websites?

Many websites serve WebP because it loads faster. When you save the image, you get the WebP file the site used. If you need a JPG or PNG, convert it with a WebP to JPG or WebP to PNG converter.

How do I convert WebP to JPG?

Open DockFlip WebP to JPG, choose your WebP files and download the JPGs. The conversion runs in your browser, so the images are not uploaded. Use WebP to PNG instead if the image has a transparent background.

Which image format is best for SEO?

WebP is the best default for website images because smaller files help pages load faster. Also resize images to the width they are shown at, use descriptive file names and write alt text. AVIF can be even smaller where your platform supports it.

Which format should I use for a logo?

Use SVG on websites if you have it, because it stays sharp at any size. Otherwise use PNG, which keeps a transparent background, or WebP for a smaller file on your own website. Avoid JPG for logos, because it cannot be transparent and blurs sharp edges.

Does WebP work on iPhone and Mac?

Yes. Safari on current versions of iOS and macOS shows WebP images, and recent versions of macOS Preview can open them. Some older apps may still not support WebP, so convert to JPG or PNG if a file will not open.

DockFlip Team. We build free image and PDF tools that run in your browser. This guide was last updated on .