AVIF vs WebP in 2026: Which Image Format Actually Wins?
AVIF adoption grew 386% in two years while JPEG keeps fading. But does that mean you should...
Read guideConvert JPG to JXL, the JPEG XL format, right here in your browser. PNG and WEBP work too. Pick a quality or switch to lossless, and each file shows how much it saved before you download it.
One image or a whole batch, converted to .jxl on your device
One 1280 by 863 photo, a 398.6 KB JPG, run through this page's encoder at several settings. WEBP and JPG rows come from the same browser (Chrome 157) re-encoding the same pixels.
| Output | Setting | File size | vs the 398.6 KB JPG | Similarity (SSIM) |
|---|---|---|---|---|
| JXL | Quality 60 | 63.6 KB | 84.0% smaller | 0.930 |
| JXL | Quality 75 (default) | 95.2 KB | 76.1% smaller | 0.955 |
| JXL | Quality 90 | 191.9 KB | 51.9% smaller | 0.985 |
| JXL | Lossless | 992.8 KB | 2.5x larger | 1.000 (exact) |
| WEBP | Quality 75 | 110.9 KB | 72.2% smaller | 0.958 |
| WEBP | Quality 90 | 233.9 KB | 41.3% smaller | 0.986 |
| JPG | Quality 75 | 151.7 KB | 62.0% smaller | 0.962 |
| JPG | Quality 90 | 292.2 KB | 26.7% smaller | 0.983 |
Similarity is SSIM on brightness in 8 by 8 pixel windows, comparing each output with the pixels of the original JPG; 1.000 means identical. Quality numbers do not mean the same thing across formats, so compare the size and similarity columns together. AVIF is missing because Chrome 157 does not encode AVIF from a canvas: asked for AVIF, it returned a PNG.
The setting in each format that landed closest to a similarity of 0.98 on the same photo.
JXL beat a fresh JPG by about 29 percent here, and edged WEBP by about 3 percent while scoring slightly higher. That is one photo, not a law of nature. Run your own image through the tool and the exact sizes appear next to each file.
"Lossless" here means the JXL stores exactly the pixels your browser decoded. We checked that claim by decoding each lossless file again and comparing every pixel with the input: zero differences, including the transparent edges of a PNG cutout.
Whether that saves space depends entirely on what you start with:
One thing this tool does not do: the reversible JPEG recompression that the official cjxl command line encoder offers, where the original JPG bytes are packed inside the JXL and can be rebuilt bit for bit. This browser encoder works from decoded pixels, so it cannot give you that JPG file back. If you need that archive feature, use cjxl on your computer.
The same 1280 by 863 photo at quality 75, timed in headless Chrome on our test Mac.
| Effort | File size | Encode time |
|---|---|---|
| Fast (3) | 106.2 KB | about 0.5 s |
| Balanced (7) | 95.2 KB | about 3 s |
| Smallest file (9) | 88.9 KB | about 11.5 s |
Effort changes the file size and the wait, never the visual quality target. Lossless at effort 9 is much slower: 89 seconds for the 1.59 MB PNG photo, for a file only 1.1% smaller than effort 7. On screenshots it is worth the wait; on photos it rarely is.
<picture> element.It re-encodes pixels. It cannot pack your original JPG inside the JXL so it can be restored byte for byte later. Keep your originals.
Camera details, dates and GPS location are not copied into the JXL, because the image is rebuilt from pixels. Color is converted to standard sRGB on the way.
Animated GIF or WEBP input is encoded as a single still frame.
The encoder uses one CPU core. Expect a few seconds per photo at Balanced effort, and far longer at effort 9 in lossless mode. Very large images can run out of browser memory on a phone.
Support is new and not universal yet. Check where the file is going before you delete the JPG.
Your browser opens the image the normal way and hands its raw pixels to a WebAssembly build of libjxl, the reference JPEG XL library, packaged as @jsquash/jxl 1.3.0 and fetched from the jsDelivr CDN the first time you convert. The encoder runs in a background worker so the page stays responsive while it works.
The finished file starts with the bytes FF 0A, the JPEG XL codestream signature, which is how any program recognizes it as JXL whatever the file is named. To check a result, drop it into the JXL to JPG converter: it decodes the file and shows its dimensions.
Drop one or more JPG, PNG or WEBP files into the box at the top, leave the quality at 75 or move the slider, and press Convert to JXL. Each image is encoded to JPEG XL on your device and gets its own download button with the before and after size. Several files can be saved together as one ZIP.
Only if you tick Lossless, and even then it is lossless for the pixels, not for the JPG file. The tool decodes your JPG and stores those exact pixels. On our 398.6 KB test photo that produced a 992.8 KB JXL, about 2.5 times bigger. The reversible JPEG recompression that the official cjxl command line tool offers keeps the original JPG data inside the JXL; this browser encoder does not do that.
On our 1280 by 863 test photo, JXL at quality 88 came out at 169.1 KB with a similarity score of 0.980, while a JPG at quality 88 needed 239.0 KB for 0.979. That is about 29 percent smaller for the same look. Against our original 398.6 KB JPG, quality 75 gave a 95.2 KB file. Your photos will differ, so check the size shown next to each file.
Yes. PNG, WEBP and JPG all work. For PNG, Lossless mode is usually the right choice: a 112.5 KB screenshot became a 64.8 KB lossless JXL at the default effort and 47.5 KB at effort 9, with every pixel identical when decoded again.
No. Chrome 155, Firefox 158 and Safari 17 or newer can show it, but many upload forms, messaging apps, photo printers and older programs still reject .jxl. Keep the original JPG or PNG unless you know where the JXL is going. If someone cannot open it, the JXL to JPG converter turns it back.
No. The JPEG XL encoder is a WebAssembly file that your browser downloads from a public code CDN. Your images are read, encoded and saved on your own device. Nothing is sent anywhere, and closing the tab clears everything.
JPEG XL tries many ways to describe each part of the picture, and this encoder runs on a single CPU core inside the browser. On our test Mac a 1280 by 863 photo took about 0.5 seconds at Fast, about 3 seconds at Balanced and about 11.5 seconds at Smallest file. Lossless at effort 9 is far slower: 89 seconds for one large photo.
AVIF adoption grew 386% in two years while JPEG keeps fading. But does that mean you should...
Read guideA comprehensive comparison of JPG, PNG, and WEBP image formats. Learn when to use each format...
Read guideYou select an image, click Upload, wait a few seconds... then nothing happens. The frustrating...
Read guide