Skip to main content

Reference

Image file formats, explained and measured

Checked against the sources on

What is here

One page per image format AltFTool can convert, answering what the format is and how to open it, and one page per pair people actually choose between. Facts come from the format's own specification or registration; file sizes come from real encodes in a browser, not from marketing averages.

Which image format should you use?

Which image format to use, by job
Your jobUseWhyDetails
Photo you will email, upload to a form or printJPGOpens almost everywhere; some upload forms accept nothing else.PNG vs JPG
Photo on your own web pageWebP, or AVIF with a fallbackSmaller than JPG at similar fidelity in our measurements.JPG vs WebP
Screenshot, chart or text that must stay sharpPNGLossless, and flat colour compresses well.What is a PNG file?
Logo or cut-out with a transparent backgroundPNG to keep, WebP for the webJPG cannot store transparency.PNG vs WebP
HDR or 10-bit photo for the webAVIFAVIF carries HDR; lossy WebP is 8-bit.WebP vs AVIF
Photo that arrived as HEICKeep the HEIC, send a JPG copyMany browsers and forms may not open HEIC.HEIC vs JPG

Formats

Comparisons

One photo, five formats

The same synthetic 960 x 640 photo in each format. PNG, JPEG and WebP were written by the browser's canvas; the AVIF and HEIC files were made outside the site because this browser cannot write them.

One photo in five formats
FormatBytesSizeFidelity to the original
PNG (lossless)1,275,2251245 KBidentical pixels
JPEG, quality 0.8286,53184.5 KB36.1 dB
WebP, quality 0.8271,57469.9 KB36.5 dB
AVIF (reference file)57,99256.6 KBdid not decode
HEIC (reference file)49,46148.3 KBbrowser could not decode it
Measured on 13 November 2026 in Chromium 153.0.8010.12. Each format page explains its own row.

How these pages work

Every fact row on a format page names the document it was read from: the W3C PNG Specification, RFC 9649 for WebP, ITU-T T.81 and JFIF for JPEG, the AOMedia AVIF specification, and the IANA media-type registrations. Browser support is quoted from MDN with the date it was read, because support changes. Where a primary document could not be opened, the page says what it leaves out instead of filling the gap.

The file sizes come from a script in the AltFTool repository (scripts/formats/measure.mjs) that encodes two fixed sample images with the same browser canvas call the site's image tools use, at the tools' default settings (plus WebP at 0.90 and 1.0 to show where its lossless mode starts), then decodes each file and measures how far it drifted from the original. Fidelity is reported as PSNR in decibels against the original pixels, both composited over white; higher is closer. KB on these pages is 1,024 bytes. A page whose measurement is missing is kept out of search results until the script runs again.

  • Browser: Chromium 153.0.8010.12 (through Playwright 1.63.0); HEIC decoding through heic2any 0.0.4. Measured on 13 November 2026.
  • Synthetic photo: A 960 x 640 opaque continuous-tone landscape with film grain, drawn from a seeded PRNG. Stands in for a camera photo. Dedicated to the public domain (CC0).
  • Synthetic graphic with transparency: A 960 x 640 card with flat colours, hard edges, text-like bars, a bar chart, an anti-aliased dot and a soft shadow on a transparent background. Stands in for a screenshot, logo or UI image. Dedicated to the public domain (CC0).
  • photo.heic: made outside the site with pillow-heif 1.8.1 (libheif 1.23.6, x265 4.3+1-e9b8812), Pillow 13.0.0; quality 43 (pillow-heif scale 0-100), RGB 8-bit; picked as the quality whose PSNR, decoded by libheif 1.23.6 and measured with FFmpeg, came nearest the WebP 0.82 encode (about 36.2 dB against 36.5 dB). Decoded by heic2any in the browser, the same file measures lower.
  • photo.avif: made outside the site with FFmpeg 6.1.1 (Ubuntu 7:6.1.1-3ubuntu5) with libaom-av1 3.8.2; still picture, crf 17, cpu-used 4, one thread, yuv420p; picked as the crf whose PSNR, decoded and measured with FFmpeg, came nearest the WebP 0.82 encode of the same sample.

A synthetic photo is not a real one, and another browser's encoder will produce other byte counts. Treat each figure as one reproducible example, not as an average.

Need a different format?

Convert between JPG, PNG and WebP in your browser tab, and to AVIF where the browser supports it. HEIC photos have their own converter.