JPG vs PNG vs WebP vs AVIF: which image format should you use?
By M Alamgir Saeed · Updated
Save an image and you are asked to choose between JPG, PNG, WebP and, more and more often, AVIF. Pick the wrong one and you get a blurry logo, a huge photo that slows your website down, or a picture that will not open on someone else's computer. Here is what each format is good at, in plain English, and a simple way to decide.
The short answer
Use JPG for photos that must open everywhere, PNG for logos, screenshots and anything with sharp edges or transparency, and WebP for images on a website. AVIF gives the smallest files of all and is a great choice for websites too, but a few older programs still cannot open it.
| Format | Best for | Transparency | Typical file size |
|---|---|---|---|
| JPG | Photos, email, printing | No | Small |
| PNG | Logos, screenshots, text, graphics | Yes | Large for photos |
| WebP | Website images of any kind | Yes | Smaller than JPG |
| AVIF | Website photos where size matters most | Yes | Smallest |
JPG: the universal photo format
JPG (also written JPEG) has been around since the early 1990s and opens on practically every device, app and printer in the world. It uses lossy compression: it throws away detail the eye is unlikely to notice, which makes photos dramatically smaller.
The downside appears with sharp edges. Text, line drawings and logos saved as JPG get faint blotches around them, called compression artefacts, and every time you edit and re-save a JPG it loses a little more quality. JPG also cannot be transparent, so a logo on a coloured background always comes with a white box around it.
PNG: perfect for sharp graphics
PNG uses lossless compression, which means it keeps every pixel exactly as it was. That makes it ideal for screenshots, diagrams, icons, logos and images that contain text. PNG also supports full transparency, so a logo can sit cleanly on any background.
The price is size. A photo saved as PNG is often several times larger than the same photo as a JPG, with no visible benefit. If you have a large PNG photo, converting it to JPG or WebP is usually the quickest way to make it smaller.
WebP: the modern all-rounder
WebP was created by Google and can work in both lossy and lossless mode, with transparency and even animation. Google's own tests found lossy WebP files about 25 to 34 percent smaller than JPGs of the same visual quality, which is why many websites switched to it.
Every modern browser displays WebP, including Chrome, Edge, Firefox and Safari. Some older desktop software and a few online forms still refuse it; if that happens, convert the file to PNG or JPG and try again.
AVIF: the smallest files
AVIF is the newest of the four. It is based on the AV1 video codec and is usually even more efficient than WebP: photos often end up around half the size of an equivalent JPG. It supports transparency, high dynamic range and wide colour.
Browser support is now good, in Chrome since version 85, Firefox since version 93 and Safari since version 16. The weak spot is older software: some image viewers, editors and upload forms still cannot open AVIF files. If someone sends you an AVIF you cannot open, convert it to JPG or PNG.
How to choose: a simple rule
Ask two questions. First, is it a photo or a graphic? Photos suit JPG, WebP or AVIF; graphics, screenshots and anything with text suit PNG or lossless WebP. Second, where will it be used? For email, printing or sending to people with unknown software, choose JPG or PNG because they open everywhere. For your own website, choose WebP or AVIF to make pages load faster.
- Photo for email or print: JPG.
- Logo, icon or screenshot: PNG.
- Any image on a website: WebP (or AVIF for photos).
- Image someone sent you that will not open: convert it to JPG or PNG.
How to convert or shrink an image
All the converters on this site run inside your browser, so your pictures are never uploaded. Drop several files at once and download them together as a ZIP. To keep the same format but make the file smaller, use the Image Compressor, which can also aim for an exact size such as 100 KB.
Frequently asked questions
Is WebP better than JPG?
For websites, usually yes: WebP files are smaller at the same visual quality and can be transparent. For email or printing, JPG is safer because every program can open it.
Does converting JPG to PNG improve quality?
No. Detail lost when the JPG was created cannot be brought back. PNG only preserves the image exactly as it is now, usually in a larger file.
Why will my AVIF image not open?
Some older image viewers and editors do not support AVIF yet. Converting it to JPG or PNG makes it open everywhere.