The measurement
Each picture below was dropped into this converter with quality on Visually identical. PNG is encoded once (it is lossless); JPEG is searched to the lowest quality that still measures 0.990 or better against the source at 512 px, and on the larger pictures its busiest 512 px crop is also scored at full resolution. WebP is shown too, because on two of the three it is the answer neither PNG nor JPG is.
| Picture | PNG | JPG (searched) | WebP | Recommended |
|---|---|---|---|---|
| Harbour at eveningphotograph-like scene with grain, 1280×860 | 1425 KB | 90 KBq 73 · 0.9905 at 512 px · crop 0.8899 | 175 KBlossy, matched | JPG — a sixteenth of the PNG |
| Dashboard screenshotflat interface with text, 1100×700 | 58 KB | 25 KBq 31 · 0.9961 at 512 px · crop 0.9795 | 11 KBlossless | Lossless WebP; of the two, PNG |
| Ring logodrawn, on transparency, 640×640 | 30 KB | 9.3 KBq 31 · 0.9926 at 512 px | 8.6 KBlossless | Lossless WebP or PNG — JPG loses the transparency |
What the numbers say
On the photograph-like scene the matched JPEG is a sixteenth of the PNG — 90 KB against 1.39 MB. Grain and gradients defeat PNG’s prediction, and JPEG discards detail the eye does not track. Lossy WebP, held to the same bar, came out larger than the JPEG on this picture: the “WebP is a quarter smaller” rule of thumb is an average, not a promise.
On the screenshot, the matched JPEG is smaller than the PNG in bytes — but look at how it got there. The 512 px score is generous to JPEG on text, so the search went all the way down to quality 31; the full-resolution check of the busiest crop then measured 0.9795, below the 0.990 bar, and the card says so. That is the ringing around letters that makes JPEG the wrong tool for a screenshot. Lossless WebP was smaller than both, with every pixel exact.
On the logo, JPEG is not a candidate at all: it cannot hold the transparent background, so its byte count is for a version flattened onto white. Lossless WebP keeps the transparency at under a third of the PNG.
So the question is not which format is better but what the picture is. Photographs want lossy; drawn pictures want lossless; transparency rules JPEG out. This converter classifies each file from two measurements and prints the rule that decided — and when a route fixes the target, it writes what you asked for and says beside it when the measurement disagrees.