Guides › Photos & files

PNG, JPG or WebP for screenshots? We saved the same one nine ways

Photos and screenshots look alike to a computer, both are just grids of pixels, but they compress very differently. A photo is full of soft gradients and noise; a screenshot is flat colour, hard edges and small text. To show what that means in practice we took one screenshot of a typical web page and saved it in nine ways, then measured the size and how far each file drifted from the original.

Short answer: for screenshots use PNG or lossless WebP. Lossless WebP made by a dedicated encoder was the smallest file of all in our test, smaller even than lossy JPEG, with zero changed pixels. JPEG was larger than WebP at both qualities where we tested both (75 and 90), and in our single-screenshot test it was the only format that left faint halos around the text.

The test

We captured our own JSON formatter page at 1200 × 800 pixels in Chromium 153: white background, a grey text box, blue buttons and black text, which is a fair stand-in for a typical app or document screenshot. Then we encoded it with the browser's own canvas.toBlob() (the same call our image converter uses) as JPEG at qualities 75, 90 and 95, as WebP at 75 and 90, and as lossless WebP, and once more with the libwebp encoder in ImageMagick in lossless mode. We measured file size and SSIM, a structural similarity score where 1.0 means identical.

Results

PNG (Chromium screenshot)83 KBPNG (re-saved by canvas)118 KBWebP lossless (libwebp, ImageMagick)29 KBWebP lossless (canvas, quality 1.0)211 KBWebP quality 75 (canvas)30 KBWebP quality 90 (canvas)42 KBJPEG quality 75 (canvas)56 KBJPEG quality 90 (canvas)78 KBJPEG quality 95 (canvas)96 KB
Screenshot file size by encoding — chart drawn from the table below.
EncodingSizeSSIMPixels exact?
PNG (Chromium screenshot)83 KB1.0000Yes
PNG (re-saved by canvas)118 KB1.0000Yes
WebP lossless (libwebp, ImageMagick)29 KB1.0000Yes
WebP lossless (canvas, quality 1.0)211 KB1.0000Yes
WebP quality 75 (canvas)30 KB0.9980No
WebP quality 90 (canvas)42 KB0.9994No
JPEG quality 75 (canvas)56 KB0.9928No
JPEG quality 90 (canvas)78 KB0.9979No
JPEG quality 95 (canvas)96 KB0.9992No

What the numbers say

Four more screenshots, through the converter

One page is a small sample, so we captured four other pages at 1200 × 800 in Chrome 153 on Linux: a plain-text specification (RFC 9562), a reference page with adverts (MDN), a code view (GitHub) and a street map (OpenStreetMap, central London). We chose each PNG in our image converter, saved it as PNG, JPEG (JPG in the menu) and WebP at every quality setting, and downloaded the results. For comparison we also made a lossless WebP of each with libwebp at its slowest setting.

ScreenshotPNG from ChromePNG from the converterJPG, Good (0.85)WebP, Good (0.85)WebP lossless (libwebp)
RFC 9562 (plain-text specification)140 KB187 KB130 KB81 KB44 KB
MDN reference page with adverts176 KB231 KB149 KB85 KB74 KB
GitHub code view133 KB177 KB117 KB66 KB45 KB
OpenStreetMap, central London1,116 KB1,309 KB328 KB286 KB436 KB

The full results are in a .csv file: one row per screenshot and encoding, 36 rows in all, with the size in bytes, the share of pixels that changed at all, and the share that changed by more than 16 levels out of 255.

Why JPEG smudges text

Close-up of the Beautify and Minify buttons from the screenshot. The PNG is crisp, the JPEG quality 75 version has faint grey speckles around the letters and button borders, and the WebP quality 75 version is close to the PNG.
A 250 × 60 pixel crop enlarged 3×. Top: PNG original. Middle: JPEG 75. Bottom: WebP 75.

JPEG splits the image into 8 × 8 blocks and describes each block as a sum of smooth waves, discarding the finest waves first. A sharp black-on-white edge is made of exactly those fine waves, so when they are dropped the edge rings: faint grey or coloured speckles appear around letters and thin lines, sometimes called mosquito noise. JPEG also usually stores colour at half resolution, which bleeds colour along the edges of blue buttons and red underlines. On a photo these errors hide in the texture; on a flat white background they stand out.

Which format to use

You want to...Use
Paste a screenshot into a bug report, document or chatPNG. It works everywhere and stays exact.
Put screenshots on a websiteLossless WebP from a dedicated encoder (for example cwebp -lossless), or lossy WebP 85–90 if the page is very image-heavy. Our converter uses the browser's encoder and cannot make lossless WebP; use PNG from it instead.
Send a screenshot that contains a photo (a video frame, a game)WebP 80–90 or JPEG 85–90; the photo part dominates
Upload to a site that rejects WebPPNG; convert it before uploading
Shrink a huge screenshot of a 4K screenScale it down first with the resizer; halving width and height removes three quarters of the pixels

Is WebP safe to use?

All current major browsers display WebP, so for web pages it is a safe default. The friction is elsewhere: some older desktop programs, printing services and upload forms still accept only JPEG and PNG. If a site rejects your WebP file or shows an "unsupported format" message, convert it to PNG, which is accepted almost everywhere and keeps a screenshot exact.

Practical tips

Common questions

Why is my PNG screenshot bigger than a JPEG photo of the same size?

PNG is lossless, so it never throws detail away. For flat screenshots it is usually small, but a screenshot that contains a photo, a gradient or a video frame has far more unique pixel values, and PNG must store them all.

Does lossless WebP lose anything at all?

No. In our test every pixel of the lossless WebP files matched the original exactly. Lossless means the decoder rebuilds the identical image; only the file layout differs from PNG.

Why not use AVIF?

AVIF can compress photos even further, but encoding is slower and fewer tools and upload forms accept it. For screenshots, lossless WebP and PNG are simpler and already very small.

References

  1. Google for Developers: WebP compression techniques (lossy and lossless)
  2. Can I use: WebP image format (browser support)
  3. W3C: Portable Network Graphics (PNG) Specification, Third Edition
  4. HTML Standard: canvas toBlob()

Written and checked by Ria Kim for GlowHalo; figures without a source link come from the steps shown on this page. Companion tool: Image Converter. Spotted an error? Write to help@glowhalo.org. Chrome and Chromium are trademarks of their owners; GlowHalo is not affiliated with them.

More guides

Photos & files128, 192 or 320 kbps? What MP3 bitrate changes, measuredWe encoded the same audio at four bitrates with our converter. Size grows in a straight line; the main audible loss at 128 kbps is everything above 16.7 kHz.Read guide →Photos & filesJPEG quality 60, 75 or 90? What we measured on six photosWe encoded six standard test photos at six quality levels and measured file size and SSIM. Here is where the savings stop being worth it.Read guide →Photos & filesWhy is a PDF of phone-photo pages so big, and how small can it safely be?Three simulated phone-photo pages made a 7.0 MB PDF at 300 dpi and 1.7 MB at 150 dpi, with the text still clear. How to shrink a document PDF before you email or upload it.Read guide →