Guides中文

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

Updated

Most image problems — a photo that is 8 MB, a logo with a white box around it, a screenshot with fuzzy text — come down to using the wrong format. PNG, JPG and WebP each make a different trade-off, and once you know what that trade-off is, the choice is usually obvious.

The short version

If the image is… Use Why
A photo JPG, or WebP for the web Lossy compression suits photos; files are small
A screenshot, chart or diagram PNG, or lossless WebP Sharp edges and text stay crisp
A logo or icon with transparency PNG or WebP JPG cannot store transparency
Going on a website WebP Smaller than both at similar quality
Being emailed or opened in old software JPG or PNG They open everywhere

JPG: small files for photographs

JPG (also written JPEG) uses lossy compression. It throws away detail the eye is unlikely to notice, mostly fine colour variation, and that is why a camera photo can shrink to a tenth of its raw size and still look fine.

The cost shows up in three places:

A quality setting of 75–85 is a sensible default for photos. Below about 60, artifacts become easy to see.

PNG: exact pixels, larger files

PNG is lossless: what you save is exactly what you get back, pixel for pixel. It also supports full transparency, including soft, partially transparent edges.

That makes PNG the right choice for screenshots, user interface graphics, diagrams, logos and anything with text. It compresses large areas of identical colour very efficiently, so a simple chart can be tiny.

Photographs are the opposite case. A photo has almost no identical neighbouring pixels, so PNG has nothing to compress and the file can be five to ten times larger than a good JPG with no visible benefit. If you have a multi-megabyte PNG that is really a photo, converting it is the single most effective thing you can do.

WebP: the best of both, with one caveat

WebP was designed for the web and has both a lossy mode (like JPG) and a lossless mode (like PNG), plus transparency in either. In lossy mode it is typically 25–35% smaller than a JPG of similar visual quality, and in lossless mode it usually beats PNG as well.

Every current browser displays WebP, and so do recent versions of Windows, macOS, Android and iOS. The caveat is older software: some desktop applications, printing services and upload forms still reject it. If you are sending an image to a person rather than putting it on a page, JPG or PNG is the safer choice.

What about AVIF, GIF and BMP?

Converting without losing quality

A few rules prevent most accidents:

  1. Converting never restores detail. Turning a blurry JPG into a PNG gives you a larger file containing the same blur.
  2. Lossy to lossy costs quality. Going from JPG to WebP re-compresses already compressed data. Use a high quality setting (85–92) for the conversion, or start from the original if you have it.
  3. Check transparency. Converting a transparent PNG to JPG fills the background with white. If you need the transparency, choose WebP or stay with PNG.
  4. Resize before worrying about format. A 4000-pixel-wide photo displayed at 800 pixels wastes far more bytes than any format choice can save.

You can do all of this with the image converter on this site. It runs in your browser, so the images are not uploaded, and it can convert a batch of files and scale them down in the same step.

Try the tool

More guides