Image Format Comparison
Re-encode one photo as JPEG, WebP and AVIF at several quality settings, then compare file size and PSNR side by side to pick the smallest usable file.
Choose a photo to re-encode it in three formats at several quality settings and see which one gives the smallest file for the quality you need.
What is the Image Format Comparison?
Advice about which image format to ship is usually generic, but the right answer depends on the picture.
- JPEG, WebP and AVIF encoded from the same source pixels for a fair comparison
- Three quality ladders, from three steps up to seven
- PSNR measured against the original for every variant, with a readable verdict
- Smallest result and best file above 38 dB highlighted automatically
- Thumbnail preview of every encoded variant
- Formats your browser cannot encode are flagged rather than silently skipped
How to use the Image Format Comparison
- 1
Drop a photo into the upload area, or click it to browse.
- 2
Choose how many quality steps to test — coarse, standard or fine.
- 3
Set the maximum side length so large photos are scaled down before encoding.
- 4
Click Run comparison and watch the progress line as each format is encoded.
- 5
Compare file size, share of the original and PSNR in the results table, then check the thumbnails.
About the Image Format Comparison
Advice about which image format to ship is usually generic, but the right answer depends on the picture. The ByteTools Image Format Comparison tool settles it empirically: it re-encodes your own photo through the browser's canvas encoder as JPEG, WebP and AVIF at a range of quality settings, then tabulates every result so you can compare like for like.
Each encoded variant is decoded again and compared with the source pixel by pixel. The mean squared error becomes a PSNR figure in decibels, which is turned into a plain-language verdict: above roughly 38 dB the difference is invisible at normal viewing size, and below 30 dB the artifacts start to show. A thumbnail of every variant is rendered alongside the table.
Every encode and every measurement runs 100% locally in your browser, so your photo is never uploaded to a server. Large images are scaled down to a size cap first, which keeps a full run fast; nothing is stored anywhere, and refreshing the page discards all the generated variants immediately.
Frequently asked questions
Is AVIF really smaller than WebP and JPEG?
Usually yes for photographic content, often by a wide margin at the same visual quality. The advantage narrows on small images, flat graphics and screenshots, which is exactly why running the comparison on your own picture is more useful than following a rule of thumb.
What does PSNR mean for image quality?
PSNR is the peak signal-to-noise ratio in decibels between a compressed image and the original, derived from the average squared pixel error. Higher is closer to the source: above about 38 dB the difference is invisible at normal viewing size, while below 30 dB artifacts are usually easy to spot.
Why does AVIF show as not supported in my browser?
Encoding is done by the browser's own canvas implementation, and not every browser can write every format. Chrome and Edge can encode all three, while Safari and Firefox currently write JPEG and WebP only, so those rows are marked unavailable rather than faked.
Which image format should I use on my website?
Serve AVIF or WebP with a JPEG fallback for photographs, and pick the lowest quality step that still clears about 38 dB in this table. For flat illustrations and screenshots with sharp text, a lossless format such as PNG or lossless WebP is usually both smaller and cleaner.
Are my images uploaded during the comparison?
No. Every encode, decode and measurement happens inside your browser using the canvas API, with no network request involved. The variants exist only as temporary object URLs that are released when you leave the page.
Related tools
Convert to WebP
Convert JPG, PNG and AVIF images to WebP with an adjustable quality slider. Batch convert in your browser — smaller files, faster pages, no uploads.
JPG to AVIF Converter
Convert JPG images to next-generation AVIF format with adjustable quality. Cut file sizes up to 50% versus JPEG — free, in-browser, no uploads.
Image Compressor
Compress JPG, PNG and WebP images in your browser with an adjustable quality slider. See before/after file size and download the smaller image free.
JPEG Quality Checker
Estimate the 1-100 quality a JPEG was saved at by reading its quantization tables, plus chroma subsampling, encoding mode and bits per pixel.
Compress Image to Size (KB)
Compress a JPG, PNG or WebP to an exact file size in KB — 20KB, 50KB, 100KB, 200KB presets for online forms. Free and 100% in-browser.