Skip to content
LeedyBox
Support

JPG vs PNG vs WebP vs AVIF

The four formats store the same picture in different ways, which affects file size, sharpness, transparency and where the file will open. This guide compares them, shows a measured test, and explains which conversions help and which only make a file larger.

The Four Formats Side by Side

Feature JPG PNG WebP AVIF
Compression Lossy Lossless Lossy or lossless Lossy or lossless
Transparency No Yes Yes, in both modes Yes
Animation No Only as APNG Yes Yes
Colour depth 8 bits per channel in practice 8 or 16 bits per channel, or a palette of up to 256 colours 8 bits per channel 8, 10 or 12 bits per channel; HDR possible
Opens in Almost any software Almost any software Current browsers and many, but not all, programs Current browsers; fewer editors, upload forms and older systems

What Each Format Does Well

JPG stores fine detail in blocks of 8 × 8 pixels with reduced precision, usually with colour at a lower resolution than brightness. Photos hide this well; text and sharp edges get halos. Each time a JPG is edited and saved again it is re-encoded, which usually loses a little more detail. The quality number is explained in Image Compression Settings Explained.

PNG is lossless and compresses by finding repeated and predictable patterns, so screenshots, charts and logos stay small but photos do not. A 12-megapixel photo holds 36 million bytes of colour values (4,000 × 3,000 pixels × 3 bytes); camera noise hardly repeats, so its PNG is usually several times larger than a good JPG.

WebP has a lossy and a lossless mode, both with transparency. Lossy WebP stores colour at half the width and half the height, so thin coloured lines and red text can look soft. Neither side of a WebP image may exceed 16,383 pixels, which rules out very long screenshots; the JPG format allows up to 65,535.

AVIF comes from the AV1 video codec. For photos it is often the most efficient of the four, especially at lower quality, and it can store 10- or 12-bit colour and HDR. Encoding is usually slower, and support outside browsers lags behind WebP.

A Measured Example: One Screenshot, Six Files

We drew a 1280 × 800 dashboard screenshot (flat colours, text, a bar chart) and saved it with Python Pillow 12.3 (libjpeg-turbo 3.1, libwebp 1.6, libavif 1.4) at quality 92 where a quality applies, the same number as the fixed 0.92 the LeedyBox converter passes to the browser. Lossless WebP used its slowest, strongest setting. It is one synthetic image: browser encoders use other settings and give different numbers, and photos behave differently. 1 KB = 1,024 bytes.

Saved as File size Compared with the PNG
PNG (lossless, optimised) 53.8 KB Reference
JPG, quality 92 122.6 KB 2.3 times larger
WebP lossy, quality 92 51.8 KB About 4 % smaller
WebP lossless 19.9 KB About 63 % smaller
AVIF, quality 92 30.8 KB About 43 % smaller
The JPG above, converted back to PNG 242.5 KB 4.5 times larger

For this flat graphic, JPG was the worst choice: more than twice the size and no longer exact. Lossless WebP kept every pixel and was smallest, while lossy WebP saved almost nothing. Converting the JPG back to PNG undid nothing: PNG had to store the JPG artefacts exactly and grew to 4.5 times the original.

A 512 × 512 logo on a transparent background gave PNG 31.6 KB, lossy WebP 18.4 KB with transparency kept, AVIF 16.6 KB, lossless WebP 12.7 KB, and JPG 25.2 KB with a white square instead of transparency. Again, lossless WebP was the smallest file and kept every pixel.

What Converting Can and Cannot Do

  • It does not restore detail. A JPG saved as PNG keeps its artefacts.
  • Lossy to lossy adds loss. JPG to WebP or AVIF encodes the old artefacts again, so start from the best original you have.
  • Transparency needs a format that stores it. JPG has no alpha channel, so the LeedyBox converter fills transparent areas with white when it saves JPG or BMP, and soft edges are blended with that white. Keep PNG or WebP for logos and cut-outs.
  • Pixel dimensions often matter more. A 4,000 × 3,000 photo shown at 1,200 × 900 carries 12 million pixels where 1.08 million are needed, about 11 times as many. Even a screen with twice the pixel density uses only 2,400 × 1,800, or 4.32 million. See Resizing Images.

Converting with the LeedyBox Image Converter

  1. Open the Image Converter and click "Choose Files or Drag & Drop Here", or drop images on the box. PNG, JPG, WebP, BMP, GIF and AVIF are accepted if your browser can open the file.
  2. Each file is listed with its pixel size and a format menu that starts at JPG and also offers PNG, WebP, BMP, AVIF and ICO. Change it per file, or use the "Set All Formats To..." menu next to "Batch Options:" to change every file at once. Choose PNG, WebP or AVIF for anything transparent.
  3. Click "Convert & Download". One image downloads as its name plus "_converted", such as holiday_converted.webp; several arrive in leedybox_converted_images.zip.

The converter keeps the pixel dimensions, except for ICO, which is scaled down to fit within 256 × 256 pixels. It asks the browser for quality 0.92 (on a 0 to 1 scale) for JPG, WebP and AVIF, and there is no quality setting. Chrome and Edge create lossy WebP at that value; other browsers' encoders may behave differently. JPG and BMP get a white background; BMP is saved uncompressed at 24 bits per pixel, so a 6,000 × 4,000 photo becomes 72,000,054 bytes. Many browsers cannot create AVIF; the converter tests this when the page opens and, where it fails, disables the option and labels it "AVIF (not supported in this browser)".

Conversion runs in your browser, and the images are not sent to LeedyBox for it. Each picture is redrawn, so EXIF data, GPS position and other metadata are not copied. For a chosen quality and a before-and-after view, use the Image Compressor (JPG, WebP or PNG, with a quality slider that starts at 75 or a target file size); for smaller dimensions, the Image Resizer.

Which Format for Which Job

Job Choose Why
Photo on your own website WebP, or AVIF where supported; JPG as fallback Often smaller at similar quality
Photo for email, print or an upload form JPG Accepted almost everywhere
Screenshot, chart or text-heavy graphic PNG Exact pixels, crisp text
Logo or cut-out with transparency PNG, or WebP for web pages JPG has no transparency
Working copy you will edit again PNG or the original Lossy saves add up

For images on web pages, see also Choosing the Right Image Format for the Web.

Common Problems and Fixes

  • The transparent background turned white. The output was JPG, the starting choice, or BMP. Convert again to PNG, WebP or AVIF.
  • The file got larger. Typical for photos or JPGs saved as PNG, and for BMP, which is uncompressed. Use JPG or WebP for photos, or keep the original.
  • AVIF cannot be selected. Your browser cannot create AVIF. Choose WebP or try another browser.
  • The ZIP has fewer files than you added. Converted to WebP, logo.png and logo.jpg both become logo_converted.webp, and the later file replaces the earlier one. Rename one first.
  • Nothing was downloaded. A file fails when the browser cannot create the chosen format: some browsers cannot create WebP, and the WebP format does not allow images wider or taller than 16,383 pixels. Very large images can also exceed the canvas size a browser can handle. In a batch, one failed file stops the converter before the ZIP is made. Change that file's format or remove it.
  • An animation became a still image. Only one frame, normally the first, is kept.

What to Check Afterwards

  • View the result at actual size: text, edges, faces and gradients.
  • Compare file sizes; keep the original if the new file is not smaller.
  • Check transparent images on a light and a dark background.
  • Test the file where it will be used: some email programs and upload forms reject WebP or AVIF.

Frequently Asked Questions

Is AVIF better than WebP?

For photos AVIF is often smaller at similar visible quality, but not in every case. For flat graphics it can lose: in the screenshot test above, lossless WebP was smaller than AVIF at quality 92 and kept every pixel. AVIF is also slower to encode and opens in fewer programs, so compare both files when you can.

Should I convert my JPG photos to WebP?

On a website you control it can save bytes, but it is a second lossy step and the savings vary. Convert from the best original, compare sizes and keep the JPGs. For files you send to other people, JPG is the safer choice.

Does converting PNG to WebP in LeedyBox lose quality?

Usually a little. The converter asks the browser for WebP at quality 0.92, which Chrome and Edge encode as lossy WebP, so fine edges and coloured text can soften slightly. Transparency is kept. For an exact copy of a screenshot or a master logo, keep the PNG.

Can I convert iPhone HEIC photos?

The converter does not accept HEIC files; it takes PNG, JPG, WebP, BMP, GIF and AVIF. On an iPhone, Safari often passes a JPG copy to the page when you pick a photo from the Photos library, and that copy can be converted. Otherwise export the photo as JPG first. iPhones can also save new photos as JPG: Settings > Camera > Formats > Most Compatible.

Can I save a GIF?

No. GIF files can be added, but the output menu offers JPG, PNG, WebP, BMP, AVIF and ICO, and an animated GIF keeps only one frame. For a still graphic, PNG is the usual replacement: it is lossless like GIF and is not limited to GIF's palette of 256 colours.