HEIC, AVIF, WebP and JPEG XL Compared
Four modern image formats side by side on compression, features, speed and support, with a clear pick for each job.
Why there are four "next JPG" formats
JPG has been the default photo format since the early 1990s, and every attempt to replace it has come from a different camp with different priorities. That is why, instead of one successor, there are four serious contenders, each strong in its own territory.
- HEIC came from the video world, built by MPEG and pushed into the mainstream by Apple. It dominates phone cameras.
- WebP came from Google, which wanted lighter images for the web. It dominates website delivery today.
- AVIF came from the Alliance for Open Media, a group of tech companies that wanted a royalty-free alternative to HEVC. It is the strongest compressor that every major browser supports.
- JPEG XL came from the JPEG committee itself, designed as a true all-round successor to JPG. Technically impressive, but browser support has been the sticking point.
This guide compares all four on compression, features, speed and support, then gives a clear recommendation for each common job.
The four formats in brief
HEIC
A HEIF container holding HEVC-compressed images, standardized in 2015 and the iPhone's default since 2017. Excellent compression, HDR and depth support, and hardware encoding on phones. Held back by patent licensing, which keeps it out of most browsers. More detail in the HEIC explainer.
WebP
Released by Google in 2010, using the VP8 video codec for lossy images and a separate method for lossless ones. Fast to encode and decode, supported everywhere on the web, but limited to 8 bits per channel and a maximum of 16383 pixels per side.
AVIF
Finalized in 2019, using frames from the AV1 video codec inside a container from the same family as HEIF (the naming is untangled in HEIF vs HEIC). Very strong compression, especially at small file sizes, plus HDR and wide color. Its weakness is encoding speed: making an AVIF takes far longer than making a WebP or JPG.
JPEG XL
Standardized as ISO/IEC 18181 around 2021 and 2022. Designed for everything from web thumbnails to archival masters, with high bit depth, HDR, progressive loading and a unique ability to repack existing JPG files losslessly into smaller ones. Support is strong in some places and missing in others.
Feature comparison
| Feature | HEIC | AVIF | WebP | JPEG XL |
|---|---|---|---|---|
| Based on | HEVC video codec | AV1 video codec | VP8 video codec | Purpose-built image codec |
| Royalty status | Patent licensing applies | Designed to be royalty free | Royalty free | Designed to be royalty free |
| Lossy compression | Excellent | Excellent | Good | Excellent, especially at high quality |
| Lossless mode | Exists, rarely used | Exists, not its strength | Yes, often smaller than PNG | Yes, strong |
| Bit depth | 8, 10 and higher | 8, 10 and 12 | 8 only | Up to high bit depth and floating point |
| HDR | Yes | Yes | No | Yes |
| Transparency | Yes | Yes | Yes | Yes |
| Animation | Image sequences | Yes | Yes | Yes |
| Progressive loading | No | Limited, rarely used | No | Yes, built in |
| Lossless JPG repacking | No | No | No | Yes |
| Encoding speed | Fast with phone hardware | Slow | Fast | Fast to moderate |
| HEIC to PIC can output it | No (input only) | Yes | Yes | No |
Compression: how they rank
Ranking image formats by size is less clean than it sounds, because the answer depends on the photo, the target quality and how much effort the encoder spends. Still, broad patterns hold up well across most tests:
- At small file sizes, such as heavily compressed thumbnails, AVIF tends to look best. It smooths detail rather than breaking into blocks, so it stays presentable when squeezed hard.
- At high quality, where the goal is a photo nobody can tell from the original, JPEG XL often matches or beats AVIF and keeps fine texture like skin pores and fabric more faithfully.
- HEIC and AVIF land in a similar range overall, which makes sense since both borrow from modern video codecs.
- WebP trails the other three but still typically beats JPG by a useful margin.
One caution: quality numbers are not comparable across formats. A quality of 80 in WebP does not mean the same thing as 80 in AVIF or JPG. Compare results by looking at them, not by matching slider values.
Speed: encoding and decoding
For a website, decoding speed affects every visitor, while encoding speed only affects you. For a phone camera, encoding speed matters every time you press the shutter.
HEIC is fast to write on phones because dedicated HEVC hardware does the work. WebP is quick in software on almost any device. JPEG XL was designed with fast software encoding and decoding in mind. AVIF is the slow one to create: its encoder searches through many options to find the most efficient result, and in a browser it runs as WebAssembly rather than native code.
You will notice this in HEIC to PIC. The AVIF encoder is downloaded the first time you choose AVIF and converts noticeably more slowly than the other formats, so a large batch takes a while. That is the format's nature, not a fault.
Where each format is supported
Support is the factor that most often decides the question in practice.
- WebP: all current major browsers, most image editors, and most website platforms. The safest modern choice for the web.
- AVIF: all current major browsers, with Edge the last of the big ones to add it. Editor and operating system support has grown quickly but is not yet as universal as WebP's. See caniuse.com/avif for details by version.
- HEIC: built into Apple devices, readable on most recent Android phones and on Windows with add-ons. Recent Safari can show it in web pages; Chrome, Edge and Firefox cannot.
- JPEG XL: Safari has supported it since version 17, and Apple's operating systems can open it. Support in Chrome, Edge and Firefox has been limited, experimental or behind settings at various points, and the situation is changing. Check caniuse.com/jpegxl for the current state before you depend on it.
Which format to use for which job
| Job | Best pick | Reasoning |
|---|---|---|
| Taking photos on an iPhone | HEIC | Small, HDR-capable, hardware encoded; keep it as your archive |
| Photos on a website, maximum compatibility | WebP | Every current browser and most platforms accept it |
| Hero images where every kilobyte counts | AVIF | Smallest files with broad browser support; slow to encode, so worth it for key images |
| Email, forms, printing, sharing with anyone | JPG | None of the modern formats is accepted as universally |
| Shrinking an existing JPG archive without loss | JPEG XL, if your tools support it | Lossless repacking of JPGs is unique to it |
| HDR photos for the web | AVIF | HDR capable and widely displayed, though HDR rendering varies by screen and browser |
| Screenshots and graphics on the web | WebP lossless or PNG | Sharp edges, small files, universal support |
For a closer look at the most common web decision, read HEIC vs WebP. For the everyday question of whether to keep HEIC at all, see HEIC vs JPG.
Where each format trips people up
Each format has a characteristic failure, and knowing it helps you pick settings:
- WebP banding. Because WebP is limited to 8 bits, smooth skies and studio backdrops can show faint stepped bands at low quality. Raise the quality a notch or switch that image to AVIF.
- AVIF looking waxy. Pushed too far, AVIF smooths away texture so skin and foliage look painted. If an image looks plastic, increase quality before blaming the format.
- Broken images for some visitors. A site that serves only AVIF or JPEG XL will fail for anyone on a browser without support. When you use a newer format, offer a WebP or JPG fallback with the
pictureelement. - Quality lost through chains of conversions. Turning a HEIC into an AVIF, then that AVIF into a WebP, stacks one round of loss on another. Always convert from the original HEIC, never from a previous conversion.
- HEIC uploaded by mistake. HEIC files dropped into a website's media library often appear to upload fine and then display as broken images. HEIC is a camera format, not a web format.
What HEIC to PIC can and cannot make
HEIC to PIC reads .heic and .heif files and can write both modern web formats covered here. The HEIC to WebP converter is fast but depends on your browser's encoder: Chrome, Edge and Firefox can make WebP, while Safari may not and will show an error suggesting JPG. The HEIC to AVIF converter works in every supported browser but is slower, as described above.
HEIC to PIC does not output JPEG XL. If you need JPEG XL files, use an image editor or command-line tool that supports the format, and keep a JPG or WebP alongside for browsers that cannot show it yet. It also does not write HEIC, since the point of the tool is converting away from it.
For every output format, the files are 8 bits per channel without EXIF metadata, so HDR highlights and the capture date and location from the original are not carried over.
Run a quick comparison yourself
Published comparisons use test images that may look nothing like your photos. A ten-minute test with your own pictures tells you more:
- Pick three representative photos: one with sky or smooth gradients, one with fine texture such as foliage, and one portrait.
- Convert them to WebP with a resize preset of 1920 pixels and quality 80, and download the results.
- Switch the format to AVIF, keep the same resize preset, and download again. Changing the format re-converts everything automatically.
- Compare file sizes, then open both versions side by side at 100 percent zoom and look at the sky, the texture and the skin.
- If AVIF is much smaller and you cannot see a difference, it is worth the slower encode for your important images. If the gap is small, WebP's speed and broader tool support win.
Keep the HEIC originals no matter which format you choose. They are the highest quality version you have, and you can always convert them again when support for a newer format improves.
Frequently asked questions
Which modern format should I use for photos on my website?
WebP is the safest choice because every current browser and most platforms support it. AVIF gives smaller files with broad browser support but encodes slowly, so it suits key images.
Can HEIC to PIC convert HEIC to JPEG XL?
No. HEIC to PIC outputs JPG, JPEG, PNG, WebP, PDF, GIF, BMP, ICO, TIFF and AVIF, but not JPEG XL. Use an editor or command-line tool that supports JPEG XL if you need it.
Is AVIF better than HEIC?
They compress photos to a similar degree. AVIF's advantage is that it is royalty free and displays in all current major browsers, while HEIC is better supported by phone cameras and Apple's apps.
Why is AVIF conversion so slow?
AVIF encoders search many options to find the most efficient compression, and in a browser the encoder runs as WebAssembly. Expect AVIF batches to take noticeably longer than WebP or JPG.
Do all browsers support JPEG XL?
Not consistently. Safari has supported it since version 17, but support in Chrome, Edge and Firefox has been limited and is changing, so check caniuse.com before relying on it.