πŸ“ Measured on our own server

JPEG XL vs JPEG

We put 16 photos from phones and cameras through both formats. JPEG XL came out smaller every single time: about a fifth smaller without touching a pixel, and 20 to 33% smaller when both are compressed to the same visual quality. JPEG still wins two things: speed and, above all, compatibility, which is what decides most real-world choices.

by Robert Castillo Β· Published

πŸ” βˆ’20.7% lossless re-packβœ… 16/16 back bit for bitπŸ“‰ 20–33% smaller at equal qualityπŸ§ͺ libjxl 0.12.0

The short answer

For storing photos, JPEG XL wins on size in everything we measured; the price is speed. It can take a JPEG you already have and shrink it by around 20% with a guarantee that the original file can be rebuilt exactly, and when you compress a photo from scratch it needs far fewer bytes than JPEG for the same visual quality.

For sending photos to other people, JPEG is still the safe choice. Since October 2026 the three main browsers (Chrome, Firefox and Safari) display it by default, and Edge doesn't yet. That is a real change, but plenty of apps, upload forms and older devices have not caught up. JPEG opens everywhere; JPEG XL opens in more places every month.

The rest of this page is the evidence: two tests, the numbers for every photo, and exactly how we ran them, with links to every photo, so you can repeat it.

Test 1: re-packing JPEGs without losing anything

This is the feature people mean when they say JPEG XL is "20% smaller". When cjxl is given a JPEG, by default it does not decode the image and compress it again. It re-encodes the JPEG's own data with better entropy coding, so the pixels stay exactly as they were, and it keeps enough information to rebuild the original file.

We ran it on 16 JPEGs exactly as they were uploaded to Wikimedia Commons, all public domain (CC0): seven from phones (two iPhone 13, two iPhone 12, two Google Pixel 7, one Samsung Galaxy S21 Ultra) and nine from cameras (Fujifilm, Canon, Olympus, Nikon and Sony), between 7.8 and 26.8 megapixels. Then we turned each .jxl back into a JPEG with djxl and compared the SHA-256 checksum with the original.

PhotoJPEGJPEG XLSaved
Fujifilm X-T3 Β· river at blue hour11.46 MB8.47 MB26.1%
Fujifilm X-T3 Β· birds in foliage14.29 MB10.75 MB24.8%
Canon EOS 6D Β· cathedral, blue sky7.28 MB5.88 MB19.3%
Canon EOS 6D Β· swans in flight1.53 MB1.09 MB28.9%
Olympus E-M10 II Β· poppy9.42 MB8.12 MB13.8%
Olympus E-M10 II Β· frozen bubble, macro7.25 MB5.61 MB22.7%
Nikon D7500 Β· rural landscape8.42 MB6.06 MB28.1%
Nikon D7500 Β· steam locomotive6.35 MB5.07 MB20.2%
Sony A7R IV Β· ship at sea2.50 MB1.92 MB23.1%
iPhone 13 Β· aquarium7.42 MB6.19 MB16.5%
iPhone 13 Β· shop front at night4.45 MB3.68 MB17.3%
iPhone 12 Β· spring and trees2.80 MB2.27 MB18.8%
iPhone 12 Β· red car (HDR gain map)5.97 MB4.89 MB18.0%
Pixel 7 Β· hazy landscape (gain map + motion photo)4.76 MB4.23 MB11.1%
Pixel 7 Β· train station (gain map)3.68 MB3.03 MB17.8%
Galaxy S21 Ultra Β· leaves3.96 MB3.32 MB16.1%
All 16101.53 MB80.56 MB20.7%

All 16 files came back bit for bit identical: same checksum, same size, same metadata. That is the part that makes this safe for an archive. You are not trusting that the result "looks the same"; you can prove it is the same file.

The saving ranged from 11.1% to 28.9%, with a median of 19.0%. The camera files shrank more than the phone ones (23.0% against 16.5% on average), but read that with care: five of the nine were not straight out of the camera. Four had been written by Lightroom, Camera Raw, Photoshop or Canon's Digital Photo Professional, and one had been cropped, so this compares these particular files rather than cameras with phones. Part of the gap shows up in the jpegtran test further down: several of those files used generic coding tables, so even the old optimiser found up to 12% of slack in them, against about 3% in the phone JPEGs.

Turning up the effort barely helps. Effort 9 instead of the default 7 saved 20.9% instead of 20.7%, and took about eight times as much processor time. The default is the right setting.

The catch: HDR gain maps and motion photos

Three of our phone photos carry something extra glued on after the end of the main image. The two Pixel 7 photos contain an Ultra HDR gain map, a second small image that tells HDR screens how to brighten the picture, and one of them also carries the short video of a Motion Photo. The iPhone 12 shot taken on iOS 26 carries Apple's own HDR gain map.

cjxl keeps all of that, which is why the round trip is still bit-exact, but it stores those extra bytes as they are: it can only re-pack the main JPEG. That is why the Pixel photo with a video inside saved just 11.1%. Measured on the main image alone, the same three photos shrank by 18.3% to 21.5%, in line with the others.

The classic JPEG optimiser does something worse. jpegtran appears to save 50.7% on that Pixel photo, but only because it silently throws away the gain map and the video while leaving the metadata that says they exist. If you run lossless optimisers over a phone library, check what they do with these extras first.

Against the classic JPEG optimisers

Lossless JPEG optimisation is not new: jpegtran has been rewriting Huffman tables for decades. To compare like with like, here are the 13 photos without extra data at the end, so nothing gets dropped.

MethodSavedWhat you get
jpegtran -optimize5.2%Still a JPEG; same pixels, but not the original file
jpegtran -progressive9.5%Still a JPEG; same pixels, but not the original file
cjxl (default, effort 7)21.5%A .jxl; the original JPEG rebuilt byte for byte
cjxl -e 921.7%A .jxl; the original JPEG rebuilt byte for byte

JPEG XL saves about twice as much as the best JPEG-only trick. The price is that the result is no longer a JPEG, so anything that has to open it needs JPEG XL support, or a quick djxl back to the original.

Test 2: the same visual quality, how many bytes?

Re-packing only helps with JPEGs you already have. The other question is what happens when you save a photo from scratch, for example after editing it. Comparing "quality 80" in one encoder with "quality 80" in another means nothing, because the scales are unrelated. So we matched quality with a perceptual metric instead.

We shrank each photo to 2048 pixels on the long side, which erases most traces of its original JPEG compression, and encoded it at many quality settings with four encoders: libjpeg-turbo with its default 4:2:0 colour subsampling, libjpeg-turbo with full 4:4:4 colour, Google's jpegli, and JPEG XL. Every result was decoded and scored against the reference with SSIMULACRA2, and for each photo we interpolated the file size each encoder needs to reach the same score.

On SSIMULACRA2's own scale, 70 means high quality, where artefacts are hard to notice without the original next to it; 80 means you cannot tell the two apart side by side at 100% zoom; 85 means you cannot tell them apart flipping between them; and 90 is visually lossless.

ScoreJPEG turboJPEG jpegliJPEG XL (vs jpegli)
70 Β· high quality339 KB292 KB239 KB
(βˆ’22%)
80 Β· identical side by side529 KB469 KB382 KB
(βˆ’20%)
85 Β· identical when flipping792 KB664 KB535 KB
(βˆ’23%)
90 Β· visually lossless1,373 KB*1,289 KB964 KB
(βˆ’24%)

Sizes are the median across the 16 photos, scaled to a 2048 Γ— 1536 picture (3.1 megapixels). "JPEG turbo" is libjpeg-turbo with its default 4:2:0 colour, plus -optimize -progressive. The percentage under JPEG XL is its median saving against jpegli, the better of the two JPEG encoders, worked out photo by photo. *Only 13 of the 16 photos reached 90 with libjpeg-turbo at all; more on that below.

JPEG XL produced the smaller file on every photo at every level: 80 comparisons out of 80 against jpegli and 77 out of 77 against libjpeg-turbo. Against libjpeg-turbo, the JPEG library most programs and operating systems use, the median saving was 28% to 33% depending on the level; at a score of 80 it ranged from 16% to 63% depending on the photo. Google's jpegli closes part of that gap, but at the levels in the table JPEG XL still needed 20% to 24% fewer bytes. That is a more modest number than some you will read online, and it is what our photos actually gave.

The biggest wins came on smooth, clean pictures: at a score of 80, the swans against a blue sky and the poppy against clouds needed less than half the bytes of libjpeg-turbo as JPEG XL, and about 40% fewer than jpegli. Dense, detailed scenes such as the spring with trees or the red car still came out 14% to 16% smaller than jpegli. JPEG has nowhere to hide on a flat sky: its 8Γ—8 blocks show up as banding and blocking first.

There is also a ceiling. With its default 4:2:0 colour subsampling, libjpeg-turbo could not reach 90 on 3 of the 16 photos even at quality 100, because halving the colour resolution caps how faithful it can get. Switching it to full 4:4:4 colour fixes that, but costs more bytes at the usual levels: it needed more than the 4:2:0 version up to 80 and less from 85 upwards.

If you want the settings rather than the scores: reaching 80 took a median quality of 83 in libjpeg-turbo and in jpegli, and a distance of 1.6 in cjxl. Reaching 85 took quality 91 and distance 1.0, which is exactly cjxl's default for non-JPEG input. Visually lossless (90) took quality 97 in libjpeg-turbo and distance 0.5 in cjxl.

Speed: where JPEG still wins clearly

JPEG XL saves space by working harder, and on a single core you can feel it. To reach a score of 80, libjpeg-turbo spent a median of 0.04 seconds of processor time per megapixel, jpegli 0.06 and cjxl at its default effort 0.77: roughly 13 to 20 times more work than JPEG. In practice that is still under a second for a 3-megapixel photo, but it adds up when you process tens of thousands of files.

Decoding shows the same pattern, less dramatically. In the re-pack test, djpeg turned the original JPEGs into pixels in 0.019 seconds per megapixel and djxl needed 0.049 for the same photos re-packed as JPEG XL, about 2.5 times longer on one thread. For a 12-megapixel phone photo that is roughly a quarter of a second against six tenths. Rebuilding the original JPEG file from the .jxl took 0.045 seconds per megapixel.

The lossless re-pack itself is cheap: 0.12 seconds of processor time per megapixel at the default effort, so about 1.4 seconds for a 12-megapixel photo. Effort 9 cost about 1 second per megapixel for an extra 0.2%. Tools like djxl and cjxl can also spread the work over several cores, which shortens the wait but not the total work.

Compatibility in October 2026

This is the row that decides most real choices, and it has moved more in the last fortnight than in the previous three years.

WhereJPEGJPEG XL
Safari (Mac, iPhone, iPad)YesSince Safari 17 (2023); no progressive loading or animation
ChromeYesBy default since Chrome 155 (6 October 2026)
FirefoxYesSince Firefox 158 (13 October 2026)
EdgeYesNot in Edge 155: Microsoft withdrew it from that version's release notes on 9 October 2026
Windows 11 (Photos, Explorer)YesWith Microsoft's free JPEG XL Image Extension, version 24H2 or later
Windows 10YesNo official support
Android (gallery, system)YesNot in Android's official format list; Chrome shows it in web pages
Email, messaging, upload formsUniversalHit and miss: test before you rely on it

The sources: Chrome's change is listed as enabled by default from version 155 on Chrome Platform Status, and Firefox announced it in its 158 release notes. If you want to know what your browser does right now, our JPEG XL browser test checks it in a second. And if a .jxl lands on a machine that can't open it, the viewer or a conversion back to JPG fixes it without installing anything.

Which one should you use?

πŸ—„οΈ

Archiving JPEGs you already have

JPEG XL, with lossless re-packing. About 20% less disk, and the original file can always be rebuilt exactly.

🎨

Saving edited photos

JPEG XL if you control where they will be opened. You get the same quality in far fewer bytes, or better quality at the same size.

πŸ“€

Sending to someone

JPEG. It is the one format you can be sure the other person opens, on any device and in any app.

🌐

Images on a website

JPEG XL is now viable with a JPEG fallback inside a <picture> element. Without a fallback, not yet.

πŸ“±

HDR phone photos

Re-pack them if you like, but know the gain map is stored as-is, so the saving is smaller. Never run them through jpegtran.

⚑

Thousands of images, fast

JPEG encodes and decodes several times faster. If processing time matters more than storage, that still counts.

How we measured

Machine: a shared Ubuntu 24.04 server with 6 virtual AMD EPYC cores. Times are processor time (user plus system) for each command, run single-threaded where the tool allows it, which makes them much less sensitive to other load on the server than wall-clock time. Treat them as ratios, not absolute figures.

Tools: libjxl 0.12.0 (cjxl, djxl, ssimulacra2), libjpeg-turbo 2.1.5 (cjpeg, djpeg, jpegtran), jpegli built from its GitHub repository at commit 031a007 (June 2026), and ImageMagick 6.9.12 for the resizing.

Test 1 commands: cjxl photo.jpg photo.jxl --num_threads=0, the same with -e 9, then djxl photo.jxl back.jpg and a SHA-256 comparison. For comparison, jpegtran -copy all -optimize and jpegtran -copy all -progressive.

Test 2 commands: references made with convert photo.jpg -auto-orient -resize 2048x2048 -strip. JPEG with cjpeg -quality Q -optimize -progressive (plus -sample 1x1 for 4:4:4) at qualities 20 to 100, jpegli with cjpegli -q Q at the same qualities, JPEG XL with cjxl -d D at distances 0.2 to 15. JPEGs decoded with djpeg, JPEG XL with djxl, all scored with ssimulacra2. Sizes at each target score are interpolated between the two nearest settings, photo by photo.

The 16 photos (Wikimedia Commons, all CC0), so you can repeat the test: river at blue hour, birds in foliage, cathedral, swans, poppy, frozen bubble, rural landscape, locomotive, ship, aquarium, shop front at night, spring and trees, red car, hazy landscape, train station, leaves.

Limits: 16 photos is a small sample, not a study, and the result would shift with a different set. SSIMULACRA2 was developed by the same people who built JPEG XL; it is widely used and correlates well with human ratings, but a second metric or a panel of viewers could rank things differently. Our references come from JPEGs, not from raw files. All the scripts, the per-setting results as CSV and the source and licence of every photo are kept with the measurements, and we will gladly share them.

Common questions

Does converting JPG to JPEG XL lose quality?
Not with the lossless re-pack, which is what cjxl does by default with a JPEG and what our JPG to JPEG XL converter does by default too: the pixels are untouched and the original JPEG can be rebuilt byte for byte. We checked all 16 of our test files with SHA-256. Quality is only lost if you deliberately re-encode the image with a lossy setting.
How much smaller does JPEG XL make a JPEG?
In our test, 20.7% overall, between 11% and 29% per photo. Camera JPEGs saved more than phone JPEGs, and photos with an HDR gain map or a motion photo inside saved less, because those extras are stored unchanged.
Can I convert the JPEG XL back to the original JPG?
Yes, as long as it was made by lossless re-packing: djxl photo.jxl photo.jpg gives you back the identical file, metadata included.
Is jpegli a reason to stay with JPEG?
It narrows the gap, and the files open everywhere, which is a real advantage. But in our test JPEG XL still needed about 20% to 24% fewer bytes than jpegli for the same quality.
Do browsers show JPEG XL now?
Safari since version 17, Chrome by default since version 155 and Firefox since version 158. Edge 155 does not: Microsoft withdrew JPEG XL from its release notes on 9 October 2026.