Start a project

Tool 71 of 194 · Images

Image Quality vs Size Explorer

Stop guessing quality settings: see how much each format and quality costs in bytes and how close it stays to the original.

Image Quality vs Size Explorer

Your image

The sample is Malham limestone pavement by Paul Morris (CC0, via Wikimedia Commons). Your own image never leaves your browser.

SSIM against file size

Each dot is one quality setting; up and to the left is better. The dashed line is your target.

The pick

Smallest file that meets the target

Markup

picture element

Every encoding

FormatQualitySizevs PNGSSIMVerdict

01

What it does

Encodes your image at ten quality settings in every format your browser can write, measures SSIM against the original and picks the smallest file that meets your target.

  • Ten quality settings per format, from 30 to 95
  • JPEG, WebP and AVIF, whichever this browser can encode from a canvas
  • SSIM measured against the original on brightness, the way it's usually reported
  • Pick a target from 0.90 to 0.99 and get the smallest file that meets it

02

Private by design

Everything happens in your browser. Nothing you type, paste or upload is sent anywhere, and it keeps working offline once the page has loaded.

03

What you get

A chart of SSIM against size, the smallest file that meets your target and picture markup, with a Copy and a Download button on every result.

  • Image compression
  • SSIM
  • WebP
  • AVIF

Why it matters

Every image compressor asks for a quality number, but the number means different things in different formats, and the right one depends on the picture. A sky gradient shows banding at a setting that's invisible on a busy texture. Most people pick 80 and move on, which is often twice the bytes the image needs, or occasionally visibly worse.

This explorer measures the trade-off directly. It encodes your image at ten qualities in each format your browser can write from a canvas, decodes each result and compares it with the original using SSIM (structural similarity), which tracks what people notice better than a plain pixel difference. The chart shows size against SSIM for each format; the table lists every encoding. Choose a target and it picks the smallest file that reaches it, then writes picture markup with the formats that met it. Results depend on your browser's encoders, so the same image can differ a little between Chrome, Firefox and Safari.

How to use it

  1. Drop an image, or use the sample photo.
  2. Pick a width to test at and a quality target.
  3. Read the chart: up and to the left is better.
  4. Use the pick, and copy the picture markup.

FAQ

What SSIM should I aim for?

0.95 suits most photos on the web. Use 0.98 or 0.99 for product shots or images people zoom into, and 0.90 only for thumbnails.

Why is AVIF missing?

Some browsers can't encode AVIF from a canvas, even though they can display it. Chrome can't at the moment, for example. The page tells you which formats were tested.

Is SSIM the same as what I see?

It's close, but not perfect. It looks at local structure, contrast and brightness, so it catches blur and blockiness well. Always check the pick by eye.

Is my image uploaded?

No. Encoding and measuring both happen in your browser.

Credits and licences

Sample photo: Malham limestone pavement by Paul Morris, CC0, via Wikimedia Commons.

Work with me

Want a site that gets these right?

I build fast, accessible websites and web apps that pass these checks from day one. Tell me about your project and I'll reply personally with honest next steps.

All developer tools · Back to leej.uk