Learn / HDR Image Formats

JPEG, PNG, WebP, AVIF — which actually do HDR?

Format support pages love to claim everything works. Here's what we actually tested, and what we're still honestly unsure about.

This page only covers formats we've actually tested decode and encode support for in a real browser. If a format isn't mentioned in detail, it's because we don't have verified evidence either way yet — not because we forgot it.

JPEG

No native HDR representation of its own. But JPEG is the format the "gain map" trick (sometimes called Ultra HDR) is built on: a normal SDR JPEG, plus a second auxiliary JPEG describing how much brighter each pixel should get, plus a metadata block tying them together. Standard JPEG decoders that don't know about the trick just show the SDR base image and ignore the rest — nothing breaks.

This is the one HDR path we could build, encode, and round-trip validate entirely client-side, confirmed with real files: a genuine primary JPEG and gain-map JPEG, spliced together, decoded back apart, reconstructed to the correct luminance. It's what our Encode tool produces.

PNG

No HDR representation available in current browsers. PNG remains a solid choice for lossless SDR images with transparency, and we support converting to and from it, but it's not part of the HDR story here.

WebP

Same as PNG — no HDR path in current browsers. Good general-purpose lossy/lossless format for regular images; we support it fully for conversion and optimization.

AVIF

This is the format with the most genuine native HDR capability — the underlying AV1 codec supports real PQ and HLG tagging, and where that tagging is present, we can read it directly and reliably. The catch is entirely on the encoding side: no browser currently exposes a way to produce AVIF files locally via canvas — we tested it directly, and the browser silently substitutes a different format instead of erroring. So AVIF is a fully supported HDR input here, not yet an output we can produce.

JPEG XL and HEIF

Genuinely unknown, on purpose. Testing decode support safely requires a byte-verified minimal test file for each format, and we don't have one we're confident is correct. Rather than guess — and risk reporting a false "not supported" because our test file was wrong, not because the browser lacks support — we report both as unknown until we can verify properly.

The short version

Decode: JPEG, PNG, WebP, and AVIF all work. Encode: JPEG, PNG, and WebP work natively; HDR specifically comes from the gain-map JPEG path. Nothing here is aspirational — every claim on this page maps to a test we actually ran.