DevTools Logo

Image Diff Checker

Image Diff Checker

Compare two images pixel by pixel with a threshold-controlled heat map, changed-pixel statistics and a global SSIM score.

Runs in your browser

Image pair & controls

two slots

Choose an image

Choose an image

Pixels with max-channel Δ above this value count as changed.

Difference view

no comparison yet

Load a baseline and candidate to compare pixels

Examples

Moved button

Input
Baseline + rebuild, threshold 16
Output
Heat map with a red rectangle at the button

The largest changed region reports the bbox so a reviewer can jump to the regression.

JPEG shimmer

Input
Identical scene saved twice as JPEG
Output
Small mean Δ, few pixels over threshold 32

A higher threshold suppresses compression noise without hiding a real layout change.

Report line

Input
Copy summary
Output
changed 4.2% · mean Δ 2.1 · SSIM 0.970

A compact, reproducible statistic for a QA note or pull-request comment.

About this tool

The Image Diff Checker compares two same-size images pixel by pixel inside your browser. It stores one max-channel difference byte per pixel, then thresholds that array to produce a heat map, a changed-pixel percentage, mean and maximum deltas, and the bounding box of the largest connected changed region. All views re-render from the cached delta array, so dragging the threshold slider does not decode the images again.

Four view modes serve different jobs: side-by-side for context, difference-only with 8× amplification for near-identical pairs, a red heat map over a dimmed luminance base for locating changes, and a 50/50 onion-skin blend. An optional global SSIM score uses single-scale luminance statistics with the standard C1=6.5025 and C2=58.5225 constants, and is labeled so it is not mistaken for multi-scale SSIM.

Inputs are capped at 12 MP each to keep memory predictable; pairs with a small size mismatch can be cropped to the shared overlap. The tool never uploads pixels — the entire computation runs locally, which is the point of using it on unreleased screenshots.

What this tool does not do

  • Images above 12 MP are rejected with a note rather than silently downscaled away.
  • SSIM is single-scale and luminance-only, not MS-SSIM; it is advisory.
  • No image registration beyond the crop-to-overlap option; misaligned pairs must be aligned beforehand.
  • No ignore regions or antialiasing-aware pixelmatch mode in this version.

How to use this tool

  1. Load two images

    Choose a baseline and a candidate. The slot row shows each decoded size and byte size.

  2. Pick a threshold

    Start at 16 for screenshot pairs. Raise it to 24–32 when JPEG antialiasing shimmer dominates, lower it for subtle changes.

  3. Switch view modes

    Use Heat map to locate changes, Difference to amplify them, Onion skin to blend, or Side by side for context.

  4. Read the stats

    Changed percentage, mean delta, maximum delta, the largest changed region and global SSIM are announced in the stats strip.

  5. Export or copy

    Download the current heat/difference view as a PNG, or copy the one-line summary for a test report.

Use cases

Visual regression triage

Locate exactly what a rebuild changed compared with a baseline screenshot.

Asset variant QA

Check how much a recompressed texture differs from the original before shipping.

Spot-the-difference

Reveal small differences between two similar photos with the amplified view.

View modes and metrics

Mode / metricDefinition
Heat mapRed intensity = min(255, 2 × max-channel Δ), over 15% luminance
DifferenceEach channel shows min(255, Δ × 8)
Onion skin50% average of baseline and candidate luminance
Changed %Share of pixels with max-channel Δ strictly above the threshold
Mean ΔAverage of the per-pixel max-channel deltas
SSIMGlobal single-scale luminance SSIM with C1=6.5025, C2=58.5225

Alpha is ignored by default; a toggle includes it in the max-channel delta. The largest-region bbox uses 4-neighbour connected components.

Frequently asked questions

What threshold should I use for screenshot diffs?

Start at 16: it hides tiny decoding and compression noise while keeping real layout changes. If every antialiased edge lights up, try 24–32. If a subtle color change disappears, lower it. Threshold changes re-threshold cached deltas instantly, so experimenting is cheap.

What is SSIM and when is it better than pixel percentage?

Structural Similarity compares luminance means, variances and covariance; this tool reports a global single-scale score with the standard C1 and C2 constants. It is more perceptually meaningful than a raw changed-pixel count for compression artifacts, but it is not MS-SSIM and cannot replace a human review of where the change happened.

Can it handle slightly misaligned images?

Only to a limited extent: pairs differing by a few pixels on an edge can be cropped to the shared overlap. There is no automatic registration, so a genuinely shifted screenshot should be re-captured or aligned elsewhere first.

Why do identical images show a tiny diff?

Two visually identical JPEGs can decode to slightly different RGB values because of recompression and color management. The default threshold of 16 deliberately ignores those small deltas; the mean Δ statistic still tells you they exist.

Are my images uploaded?

No. Both files are decoded with browser APIs and the delta array lives only in the tab. There is no network request, no service to sign up for, and closing the page discards everything.

What does the largest changed region mean?

Changed pixels are grouped with 4-neighbour connected-component labeling, and the tool reports the bounding box of the largest group. In a UI regression that is usually the control that moved; in a noisy full-frame diff it may simply be the largest cluster of compression noise.