Formats
The best image format for screenshots, scans and text-heavy images
Screenshots are the one image class where a lossless format often wins outright. We ran the JPEG quality sweep to show why, and to find where the choice stops mattering.
At a glance
- On our 1920x1080 interface screenshot, JPEG at quality 40 was 170.9 KB with SSIM 0.9173; at quality 95 the same image was 752.0 KB with SSIM 0.9345 — and PSNR stayed inside 0.05 dB of 26.7 the whole way.
- PNG was 1157.2 KB for those pixels: larger than every JPEG setting tested, but lossless.
- Chroma subsampling moved the file from 394.6 KB (4:4:4) to 280.2 KB (4:2:0) at quality 85 with identical luma scores, which is exactly the class of change luma metrics cannot see.
- Our PSNR and SSIM are computed on luma only. They will not warn you about colour fringing on coloured text.
- Downscaling with nearest-neighbour left 6.85 standard deviations of halftone noise where an ideal downscale leaves 1.2; bilinear left 1.18.
- Upscaling a hard edge 4x overshot it by 10/255 per side with bicubic and 15/255 with Lanczos, while bilinear and nearest-neighbour overshot by nothing.
Why JPEG behaves so strangely on screenshots
A screenshot is not a photograph. It is mostly large areas of one exact colour, thin high-contrast edges, and text rendered with anti-aliasing — three properties that sit at the worst possible place for a codec built on an 8x8 block transform. Areas of single colour are free for PNG and cheap for JPEG; hard edges are expensive for both, and uniquely bad for JPEG, because representing a sharp step with smooth basis functions requires many coefficients and leaves ringing around the edge.
The measurements make the consequence unusually clear. Here is the same 1920x1080 screenshot encoded as JPEG at every quality step we tested, with chroma at 4:4:4 so that colour resolution is not the variable:
| JPEG quality | File size | PSNR | SSIM |
|---|---|---|---|
| 40 | 170.9 KB | 26.67 dB | 0.9173 |
| 60 | 221.2 KB | 26.71 dB | 0.9253 |
| 75 | 285.8 KB | 26.69 dB | 0.9296 |
| 85 | 394.6 KB | 26.71 dB | 0.9328 |
| 90 | 515.3 KB | 26.70 dB | 0.9332 |
| 95 | 752.0 KB | 26.72 dB | 0.9345 |
Read the left column against the middle two. Going from quality 40 to quality 95 multiplies the file size by 4.4 and moves PSNR by 0.05 dB — noise, not signal. SSIM improves more steadily, from 0.9173 to 0.9345, but that is a total gain of under two points for four times the bytes, and most of it is already banked by quality 75.
The plain reading is that the quality slider is not the control you think it is. Past roughly quality 70 it spends bytes on ringing and detail the eye does not reward, because the error metric has hit a floor set by the image class itself. Our photo measurements show the same ceiling from the other side: PSNR at quality 95 was 37.97 dB, lower than 38.85 dB at quality 85, while the file grew from 270.2 KB to 952.8 KB. When a metric gets worse as you spend more bytes, the encoder has run out of useful decisions to make.
One caveat before generalising: these figures come from a synthetic test corpus, and every image was encoded with the same library build — the method, the scripts and the raw CSV are on the benchmark page. Your screenshot has different content — video, photographs of people, thumbnails, gradients — and a region of real photographic content will behave like a photograph, dragging the optimum back up. The method and the raw CSV are published, so you can re-run it on your own screen.
What PNG costs on the same pixels
PNG's answer to the screenshot is 1157.2 KB: 1.5x the JPEG at quality 95 and 6.8x the JPEG at quality 40. Nothing was lost to get it, and that is the entire value proposition. Text edges are exact, no 8x8 block structure appears around menus, and a 1-pixel border stays a 1-pixel border at any zoom level.
Whether that is worth it depends on what comes next, and the sizes across our corpus show why the answer is not simply "no":
- The interface screenshot as PNG: 1157.2 KB for 2,073,600 pixels.
- Flat vector-style artwork, 1200x1200, as PNG: 190.2 KB — 1.44 million pixels in less than a fifth of the bytes, because it has few distinct colours and large flat areas.
- A transparent logo, 800x800, as PNG: 70.3 KB including its alpha channel.
Flat UI compresses well because filters do their job: a row inside a solid panel predicts perfectly from the row above, so the filtered data is mostly zeros and DEFLATE stores it in almost nothing. Photographic content inside a screenshot destroys that advantage — a video thumbnail or a photo widget in the middle of a page brings sensor-like noise into a file that has to reproduce it exactly.
The practical question is not "PNG or JPEG" but "how much of this screenshot is flat?" A screenshot that is 95% interface chrome and text will often be smaller as an indexed-colour or optimised PNG than as a JPEG that has already degraded its text. A screenshot that is mostly a photo with a small toolbar attached should be treated as a photo. There is a grey zone in between, and that zone is worth measuring rather than guessing: encode both and compare, as we do on the output testing page.
Chroma subsampling matters more than the quality slider
Most JPEG encoders expose one setting that has a bigger effect on text than the quality number, and most exporters hide it. Chroma subsampling discards colour resolution while keeping luma at full resolution. At 4:4:4 each pixel keeps its own colour value; at 4:2:2 colour is sampled every second pixel horizontally; at 4:2:0 it is halved in both directions, so three quarters of the colour samples are gone.
| Image | Setting | Quality | Size | PSNR | SSIM |
|---|---|---|---|---|---|
| Screenshot | 4:4:4 | 85 | 394.6 KB | 26.71 dB | 0.9328 |
| Screenshot | 4:2:2 | 85 | 315.6 KB | 26.71 dB | 0.9328 |
| Screenshot | 4:2:0 | 85 | 280.2 KB | 26.71 dB | 0.9328 |
| Screenshot | 4:4:4 | 75 | 285.8 KB | 26.69 dB | 0.9296 |
| Screenshot | 4:2:0 | 75 | 212.3 KB | 26.69 dB | 0.9295 |
| Photo | 4:4:4 | 85 | 270.2 KB | 38.85 dB | 0.8921 |
| Photo | 4:2:0 | 85 | 183.5 KB | 38.85 dB | 0.8922 |
Every row is a real trade you might make, and the metrics say the trade is free. It is not, and we should say plainly why our own numbers cannot tell you: our PSNR and SSIM are computed on a luma-weighted greyscale conversion of the image. Colour differences are averaged away before scoring. A change that damages nothing but chroma scores as perfect in these tables, which is why the 4:2:0 rows look like a free 29% saving.
What actually happens at 4:2:0 on a screenshot is worth predicting rather than measuring blind. Thin coloured elements — a blue link, an orange button icon, red text on a white table row, a syntax-highlighted code block — lose their chroma detail and pick up colour bleeding a pixel or two wide. Fine grey and black text is mostly unaffected, because luma is untouched. So the setting behaves like a judgement about colour, not about quality: if the colour is doing work in the image, keep 4:4:4. If the content is essentially greyscale text with a coloured logo in the corner, 4:2:0 is reasonable, and on a photograph it is almost always the right default.
Most importantly: exporters that offer "quality 80" without a subsampling control are choosing 4:2:0 for you. If a screenshot is going to be read as text, that is the setting to find and change before you touch the slider.
Resizing a screenshot before you compress it
Dimensions dominate file size more than any format decision, so resizing is usually the first move — and the resampling method you pick is not a detail. Our resampling study used a synthetic photo with a hard step edge and high-frequency texture, a 4x downscale from 2000px to 500px, and a box (area-average) resize as the reference, because averaging is the ideal low-pass filter for an integer ratio:
| Method | PSNR vs box reference | SSIM vs box | Detail noise after downscale | Time |
|---|---|---|---|---|
| NEAREST | 31.66 dB | 0.6028 | 6.85 | 4 ms |
| BILINEAR | 44.39 dB | 0.9813 | 1.18 | 114 ms |
| BICUBIC | 46.6 dB | 0.9856 | 1.44 | 162 ms |
| LANCZOS | 46.52 dB | 0.9835 | 1.57 | 238 ms |
Nearest-neighbour loses the plot entirely on this test: it does not average, it picks one source pixel, so a halftone pattern that should average away into a single tone survives as 6.85 standard deviations of noise — where the ideal downscale leaves only about 1.2. Bilinear, bicubic and Lanczos all land within a hair of each other, with bicubic slightly ahead on the metrics and Lanczos costing the most time for no measurable gain here.
The same choice changes what your JPEG weighs afterwards. Resizing a 1600px photograph to 800px and then encoding at quality 85 produced 79.9 KB from the nearest-neighbour version against 49.5 KB from bilinear, 52.8 KB from bicubic and 54.1 KB from Lanczos. Nearest-neighbour "preserved" detail that was really aliasing, and the encoder then paid for it — 1.6x the bytes for a visibly worse picture.
Upscaling flips the recommendation. The same study upscaled a hard edge 4x and measured how far each method overshoots the step's own values: nearest-neighbour and bilinear overshot by 0/255 — none at all — while bicubic overshot by 10/255 on each side and Lanczos by 15/255. That overshoot is a halo, and on a screenshot it appears as a bright or dark outline on every window edge and glyph stroke. If you have to enlarge a screenshot, bilinear is the method that will not invent edge artefacts; if you have to enlarge a photograph and keep it smooth, bicubic is the better trade, halo included.
For screenshots specifically, the best resize is usually no resize at all. Captured at the display's full resolution and displayed at a smaller size by the browser, the file stays sharp on retina screens and costs nothing extra in HTML. If a size limit forces a downscale, use an integer factor — 2x downscale of a 2x screenshot is exact and preserves glyph shapes — and use a method that averages rather than samples.
Scans, documents and dark-mode screenshots
Three sub-cases behave differently enough to deserve their own advice.
Text-heavy document scans are the easiest case of all, and the one where people most often reach for JPEG out of habit. A black-and-white page is a two-colour image; PNG can store it with a bit depth of 1, one bit per pixel, before compression, and greyscale PNG also permits 2 and 4 bits per pixel for scans with a few grey levels. A 300 dpi A4 page is about 8.7 million pixels: at one bit each that is a little over a megabyte of raw data, against roughly 26 megabytes for 8-bit RGB before a single byte is compressed. Colour documents — letterheads, stamps, annotations, highlighted passages — need chroma, so if you must use JPEG, keep 4:4:4 and stay near quality 85; the sweep above shows no useful gain after that.
Screen captures of dark interfaces are a flat-colour case in PNG's favour, for a slightly counterintuitive reason: a large dark panel is a single exact colour repeated across hundreds of thousands of pixels, and rows predict perfectly from the row above. The bright text and icons inside it are hard edges, which cost PNG almost nothing and cost a block codec a lot. The result is a file that is both smaller and cleaner than the JPEG alternative — and because dark interfaces are usually where people notice artefacts, the visible difference is larger than the byte difference suggests. Overlaying a transparency, such as a floating toolbar rendered with a soft shadow, forces PNG or WebP anyway, since JPEG cannot store alpha.
Scanned photographs, screenshots containing photos, and video-frame captures are the case where JPEG earns its place. If most of the frame is continuous tone, the flat-region advantage disappears and the balance tips to lossy: quality 75–85, 4:2:0, and stop there.
Recommendations by screenshot type
| Screenshot type | First choice | Reasonable fallback | What to avoid |
|---|---|---|---|
| UI screen, settings panel, dialog | PNG | WebP lossless, AVIF | JPEG above quality 75 |
| Code, terminal or log capture | PNG | WebP lossless | 4:2:0 at any quality (chroma on syntax colours) |
| Dark-mode interface | PNG | WebP | JPEG q95 (no visual gain, large files) |
| Screenshot with transparency | PNG | WebP with alpha | JPEG (flattens onto a matte) |
| Document scan, black and white | PNG at 1-bit or 8-bit greyscale | PDF wrapped around the same PNG | JPEG q95 |
| Coloured document scan | PNG, or JPEG q85 with 4:4:4 | WebP | JPEG with 4:2:0 |
| Screenshot dominated by a photo | JPEG q75–q85 with 4:2:0 | WebP, AVIF | PNG unless exactness is required |
| Animated capture | APNG | Animated WebP | GIF, unless compatibility demands it |
| Screenshot for an app store or upload form | PNG (then check the stated limit) | JPEG | Guessing the limit rather than reading it |
Two operational notes matter as much as the format choice. First, most capture tools already write PNG, so the only real decision is whether to convert down: keep the PNG as the master and treat any lossy version as a derivative. Second, when a platform publishes maximum dimensions, that is the constraint that will actually bite — a 4000x3000 PNG that gets rejected does not become acceptable by becoming a JPEG, it becomes acceptable by being cropped or scaled. The format comparison guide covers the support side of these choices. If you are starting from a WebP screenshot that a tool or a download handed you, converting it to PNG is a decode-and-re-encode that leaves the pixels exactly as they were; the WebP to PNG guide covers the settings.
Convert WebP files to PNG or JPG — in your browser
Batch conversion, ZIP download, transparency kept. No upload.
Sources
- PNG Specification, Third Edition — permitted bit depths per colour type, filtering behaviour, indexed and greyscale modes — https://www.w3.org/TR/png-3/
- MDN: Image file format guide — JPEG has no alpha channel; format capability summary — https://developer.mozilla.org/en-US/docs/Web/Media/Guides/Formats/Image_types
- Pillow image file formats — PNG
optimizeand JPEGquality/subsamplingsave options — https://pillow.readthedocs.io/en/stable/handbook/image-file-formats.html - Measured results: study-a-format.csv, study-b-jpeg-quality.csv, study-b2-subsampling.csv, study-c-resize.csv — ./assets/bench/
- Test conditions: synthetic regenerable corpus, Pillow 11.0.0, measured 22 October 2026; PSNR and SSIM computed on a luma-weighted greyscale conversion, so chroma-only changes are not scored.