In-browser image codec benchmarks
How long each codec on convert.now takes, and how big its output is, on real photographs and screenshots. Measured on 11 November 2026 in Chromium 158.0.8127.18 on one machine. Results that do not favour us are included.
Summary
On four photographs at 4000 pixels wide, JPEG encoding took a median of 121 ms, WebP 598 ms, JPEG XL 3.5 s and AVIF 3.3 s, all at quality 82. Against the source PNGs, the JPEGs came out 96% smaller, the WebPs 97% smaller and the AVIFs 98% smaller. Screenshots behave differently: see the second table.
Speed
Encode and decode time by format
| Format | Kodak photos0.39 MP | Photos, 2000 px wide2.25 to 3.2 MP | Photos, 4000 px wide9 to 12.8 MP | Screenshots5.18 MP |
|---|---|---|---|---|
| JPEG (jpegli)quality 82, progressive | 6.2 ms4.8 ms to 8.1 msdecode 5.1 ms | 29.6 ms27.6 ms to 42.7 msdecode 24.3 ms | 121 ms115 ms to 167 msdecode 93.8 ms | 57.4 ms56.0 ms to 62.0 msdecode 49.2 ms |
| WebP (libwebp)quality 82, lossy | 34.2 ms27.4 ms to 43.3 msdecode 4.6 ms | 155 ms146 ms to 257 msdecode 13.8 ms | 598 ms568 ms to 845 msdecode 43.6 ms | 248 ms239 ms to 254 msdecode 16.4 ms |
| AVIF (rav1e)quality 82, speed 6 | 172 ms137 ms to 237 msdecode 22.9 ms | 956 ms928 ms to 1.4 sdecode 108 ms | 3.3 s3.1 s to 4.6 sdecode 351 ms | 1.3 s1.2 s to 1.4 sdecode 170 ms |
| JPEG XL (libjxl)quality 82, effort 7 | 152 ms137 ms to 173 msdecode 11.6 ms | 1.1 s935 ms to 1.5 sdecode 59.4 ms | 3.5 s3.0 s to 4.2 sdecode 267 ms | 1.6 s1.6 s to 1.7 sdecode 144 ms |
| PNGlossless, OxiPNG level 2 (the default) | 245 ms164 ms to 326 msdecode 5.0 ms | 2.6 s2.2 s to 3.4 sdecode 29.6 ms | 9.2 s8.8 s to 14 sdecode 116 ms | 2.2 s2.2 s to 2.3 sdecode 22.7 ms |
Top figure: median encode time across the images in the set. Second line: fastest and slowest image. Third line: median time to decode that output again.
Size
Output size by format
| Format | Kodak photos | Photos, 2000 px wide | Photos, 4000 px wide | Screenshots |
|---|---|---|---|---|
| Source PNGthe files as downloaded or captured | 626 KB | 3.2 MB | 12.7 MB | 509 KB |
| JPEG (jpegli) | 62 KB−90% | 168 KB−95% | 515 KB−96% | 182 KB−64% |
| WebP (libwebp) | 63 KB−90% | 132 KB−96% | 397 KB−97% | 109 KB−79% |
| AVIF (rav1e) | 49 KB−92% | 98 KB−97% | 278 KB−98% | 115 KB−77% |
| JPEG XL (libjxl) | 60 KB−90% | 158 KB−95% | 538 KB−96% | 172 KB−66% |
| PNG | 601 KB−4% | 2.6 MB−18% | 10.3 MB−19% | 343 KB−33% |
Average size per image, and the change in total size against the source PNGs. Quality 82 means something different in each codec, so a smaller file here is not proof of better compression at equal quality. No perceptual quality metric was computed.
Re-encoding
Converting a file that is already compressed
Most conversions start from a JPG, WebP or AVIF, not from untouched pixels. Each row takes the output from the tables above, decodes it, and encodes it again in another format at quality 82. The change is against the file being converted.
| Conversion | Kodak photos | Photos, 2000 px wide | Screenshots |
|---|---|---|---|
| JPG to WebP | 53 KB−15% | 113 KB−33% | 111 KB−39% |
| JPG to AVIF | 42 KB−33% | 87 KB−48% | 104 KB−43% |
| JPG to PNG | 466 KB+646% | 1.5 MB+794% | 685 KB+277% |
| WebP to JPG | 61 KB−4% | 160 KB+21% | 183 KB+68% |
| WebP to AVIF | 47 KB−26% | 93 KB−29% | 117 KB+7% |
| WebP to PNG | 481 KB+659% | 1.4 MB+974% | 491 KB+349% |
| AVIF to JPG | 60 KB+22% | 158 KB+60% | 179 KB+56% |
| AVIF to WebP | 57 KB+16% | 118 KB+20% | 110 KB−4% |
| AVIF to PNG | 477 KB+876% | 1.5 MB+1485% | 671 KB+485% |
Method
How these were measured
- Date
- 11 November 2026
- Machine
- Apple M3 Pro, 12 logical cores, 36 GB memory. Darwin 27.2.0 arm64.
- Browser
- Chromium 158.0.8127.18 (headless, Playwright). Cross-origin isolated: yes, so the AVIF encoder ran multi-threaded (it uses up to 8 threads; the browser reported 12 cores).
- Machine load
- The machine was doing other work during the run. Its 1-minute load average, sampled after each image, ranged from 6.3 to 15 on 12 cores. Encode and decode times are therefore likely slower than an idle machine would give, and the larger image sets were measured under the heaviest load. File sizes are not affected.
- Build
- The site's development server (next dev), not a production build. The codecs are the same WebAssembly binaries either way; the JavaScript around them is unminified in development.
- Procedure
- Each source PNG is decoded once. The pixels are then encoded to each format through the converter's own encode function, three times per image (once for the 4000-pixel photos), keeping the median. Times include handing the pixels to the codec's worker and getting the file back. One warm-up conversion runs first so that loading the codecs is not counted.
- Settings
- JPEG (jpegli): quality 82, progressive. WebP (libwebp): quality 82, lossy. AVIF (rav1e): quality 82, speed 6. JPEG XL (libjxl): quality 82, effort 7. PNG: lossless, OxiPNG level 2 (the default). Quality 82 is where the converter's quality slider starts.
- Kodak photos
- The 24 images of the Kodak Lossless True Color Image Suite, 768×512 pixels each, which Eastman Kodak released for unrestricted use. It is a long-standing test set for image codecs. 24 images, 0.39 MP.
- Photos, 2000 px wide
- Four public-domain photographs from Wikimedia Commons, resized from the original JPEG to 2000 pixels wide with macOS sips and saved as PNG. 4 images, 2.25 to 3.2 MP.
- Photos, 4000 px wide
- The same four photographs resized to 4000 pixels wide, which is about the size of a phone camera photo. 4 images, 9 to 12.8 MP.
- Screenshots
- Four screenshots of this site (the home, tools, about and privacy pages) at 1440×900 with a device scale factor of 2, so 2880×1800 pixels. Flat colour, text and UI, which is the content PNG is designed for. 4 images, 5.18 MP.
- Photo files
- From Wikimedia Commons, each marked public domain there: Stargazer and Pegasus F43 in flight over Atlantic (KSC-20161212-PH LAL01 0009).jpg; Long-billed curlew (52099434724).jpg; Portrait of ASTP crews - restoration.jpg; Curiosity - Robot Geologist and Chemist in One!.jpg.
- Not measured
- Visual quality (no SSIM or similar metric), memory use, phones, Safari and Firefox, the single-threaded AVIF encoder, and lossless WebP. The larger photos were resized from JPEG originals, so they carry whatever the original compression left behind.
Earlier run
The previous codecs (jSquash), May 2026
Before building its own codecs, convert.now used jSquash. This comparison was run in Headless Chrome on 29 May 2026 with one synthetic 512×512 image. It has not been repeated, because jSquash is no longer in the app, and its numbers should not be compared with the tables above.
| Operation | jSquash | convert.now | Time | Size |
|---|---|---|---|---|
| JPEG q80 encode | 40 ms42.5 KB | 5 ms30.3 KB | −87% | −29% |
| WebP q80 encode2 | 30 ms58.3 KB | 48 ms58.3 KB | +60% | same |
| AVIF q50 encode3 | 323 ms13.0 KB | 379 ms25.2 KB | +17% | +94% |
| PNG + OxiPNG level 24 | 161 ms521.8 KB | 132 ms521.8 KB | −18% | same |
- 2Both engines use the same libwebp, which is why the output sizes match exactly. Our build at the time left out libwebp's SIMD code paths, which is why it was slower. The current build includes them. This row is the original measurement and has not been re-run.
- 3Not a like-for-like comparison. The quality scales differ (rav1e q50 is not aom q50), and this was the single-threaded encoder. On this unmatched basis the baseline was both faster and smaller.
- 4Both engines run OxiPNG, so the output is byte-identical. The difference is pipeline overhead.
FAQ
Browser codec performance: common questions
On the machine used here, a 4000-pixel-wide photo encoded to JPEG in a median of 121 ms, to WebP in 598 ms, to JPEG XL in 3.5 s and to AVIF in 3.3 s. A 768×512 Kodak photo took 6.2 ms for JPEG, 34.2 ms for WebP and 172 ms for AVIF. Slower machines and phones will take longer.
At quality 82 on each codec's own scale, AVIF was smallest on photographs: 22% smaller than JPEG on the Kodak set and 46% smaller on the 4000-pixel photos. WebP was 1% larger than JPEG on the Kodak set and 23% smaller on the 4000-pixel photos. The quality scales are not equivalent between codecs, so these are not same-quality comparisons.
AVIF stores a single AV1 video frame, and AV1 encoding searches many more ways of predicting each block than JPEG or WebP do. In this run AVIF took 27.0 times as long as JPEG on 4000-pixel photos, with the multi-threaded encoder. Browsers without cross-origin isolation fall back to a single thread, which was not measured here.
In this run, yes, but not by as much as with photos, and with visible cost to sharp text. The four screenshots totalled 2.0 MB as PNG and 726 KB as JPEG at quality 82 (64% smaller). WebP at quality 82 gave 437 KB. PNG keeps every pixel exactly; JPEG and lossy WebP do not.
It depends on what you start from. PNG is lossless, so a PNG made from a JPG, WebP or AVIF stores every decoded pixel exactly and is much larger than the file it came from: about 7.5 times the size for the Kodak JPGs in this run. Saving a PNG as PNG again changes little. The converter runs the OxiPNG optimisation pass at level 2 by default, and against the original files the re-encoded Kodak PNGs were 4% smaller.
In part. The Kodak set is public, the four Wikimedia Commons files are named in the method section, and every setting is listed, so the sizes can be checked with any build of the same codecs. The run itself is driven by a script that opens this site's /bench page in headless Chromium, feeds it each image, and records times and sizes. That script is in the project's source, which is not public. Your times will differ with your machine.
Last updated
You may quote these figures. Please link to convert.now/benchmarks. For what the formats are and when to use each, see the format comparisons.