Original ToolkitPoint research

PNG vs JPEG vs WebP: a reproducible browser benchmark

We encoded the same three 800 × 500 synthetic scenes in Chrome as PNG, three JPEG quality levels, and three WebP quality levels. The complete 21-row result is downloadable and the script is repeatable.

What the results show

At the representative settings shown below, WebP 70 was 55% smaller than JPEG 75 for the photo-like scene, 61% smaller for the flat graphic, and 76% smaller for the simulated document scan. Those savings are specific to this browser encoder and these inputs; they are evidence, not a universal promise.

PNG preserved the source pixels exactly but produced the largest file in all three tests. That does not make PNG “bad”: exact pixels, transparency, repeated flat colours, and compatibility requirements can matter more than size. JPEG remains widely compatible and is often a sensible photo fallback. WebP produced the smallest files here while retaining similar measured pixel fidelity at the selected settings.

SceneFormatSize% of PNGPSNR (dB)
Photo-like scenePNG366.4 KB100%Lossless
Photo-like sceneJPEG 7526.8 KB7.3%39.01
Photo-like sceneWebP 7011.9 KB3.3%38.11
Flat graphicPNG93.8 KB100%Lossless
Flat graphicJPEG 7522.1 KB23.6%37.22
Flat graphicWebP 708.7 KB9.3%38.09
Document scanPNG98.7 KB100%Lossless
Document scanJPEG 7520.9 KB21.2%40.08
Document scanWebP 705.1 KB5.2%40.75

Higher PSNR means less decoded RGB pixel error. “Lossless” means the decoded PNG matched the source canvas exactly. File size alone does not measure perceived sharpness, banding, text-edge artifacts, transparency, metadata, or colour-profile handling.

Side-by-side samples

Each row below begins from the same generated canvas. Browser scaling can hide artifacts, so download the files when comparing at 100%.

Photo-like scene

Photo-like scene encoded as PNG
PNG · 366.4 KB
Photo-like scene encoded as JPEG at 75 quality
JPEG 75 · 26.8 KB
Photo-like scene encoded as WebP at 70 quality
WebP 70 · 11.9 KB

Flat graphic

Flat graphic encoded as PNG
PNG · 93.8 KB
Flat graphic encoded as JPEG at 75 quality
JPEG 75 · 22.1 KB
Flat graphic encoded as WebP at 70 quality
WebP 70 · 8.7 KB

Document scan

Document scan encoded as PNG
PNG · 98.7 KB
Document scan encoded as JPEG at 75 quality
JPEG 75 · 20.9 KB
Document scan encoded as WebP at 70 quality
WebP 70 · 5.1 KB

Reproducible method

  1. A deterministic script draws a photo-like gradient scene, a flat interface-style graphic, and a simulated scanned document. No stock image or third-party copyrighted photograph is used.
  2. Chrome’s Canvas encoder saves each scene as PNG, JPEG at qualities 90/75/55, and WebP at qualities 85/70/50.
  3. Each output is decoded back to pixels. The script records byte size and RGB peak signal-to-noise ratio (PSNR) against the original canvas.
  4. PNG size is treated as the 100% per-scene baseline. The committed CSV and JSON contain all 21 rows, not only the representative subset shown above.

Download the exact reproduction script, install the project dependencies, and run npm run benchmark:image in a locally installed Chrome or Edge browser. Results can differ across browser and operating-system versions.

How to choose a format

Limitations

Synthetic scenes are reproducible but cannot represent every camera, screenshot, transparency, colour-profile, metadata, or browser-encoder workload. Canvas encoders can also differ across browser versions and operating systems. PSNR is a simple pixel-error measure rather than a complete perceptual-quality score. This benchmark does not claim that one format wins every image.

Convert an image Compress an image

Published: September 15, 2026