Image comparison: compare two images pixel by pixel

To compare two images, choose a reference image and a comparison image, then select Compare images. The tool checks every pixel, counts the ones that changed and marks them in magenta on a difference mask. You can also blend both images in an overlay and download a PNG and a JSON report. It runs in your browser.

Files stay on your device

Compare images

Reference image

The first image is your reference.

No image chosen.

Comparison image

Choose the image to compare against it.

No image chosen.

Choose two images to see their decoded previews. PNG, JPEG, WebP, GIF, TIFF, AVIF, SVG and other browser-decodable images. One still frame per file.

Comparison settings

0 catches every compared channel change. A pixel changes only above this value (0–255).

RGBA compares premultiplied color and alpha. On white compares their white-background appearance.

Padding uses the larger width and height. Images are never resized.

Choose a reference and a comparison image.

How to compare two images

Under Reference image, select Choose image and pick the original. Under Comparison image, pick the version you want to check against it. Each button then reads Replace image, and the file name appears below it. Compare images stays unavailable until both files are chosen. Use Clear below either image to remove it while keeping the other image and your settings.

Set Pixel tolerance, Alpha mode and Alignment, or keep the defaults: tolerance 0, the RGBA option and Require equal dimensions. Each image is checked and previewed when you choose it. Then select Compare images to see the changed pixels and each image's alignment offset. Changing a file or a setting clears the result until you compare again. If a replacement cannot open, the previous image and result stay available.

  1. Choose a reference image and a comparison image.
  2. Set the tolerance, alpha mode and alignment.
  3. Select Compare images and read the percentage.
  4. Pick Difference mask or Overlay, then select Download PNG.

Reading the result

The result gives the share of changed pixels, such as 0.48% changed, and a line such as 10,000 of 2,073,600 pixels exceed tolerance 0. That example is a 1920 × 1080 screenshot in which one 200 × 50 button changed color. For a nonzero share below 0.01%, the page shows <0.01% changed.

A second line gives the size of the comparison canvas and the maximum channel delta. That is the largest difference found in any compared channel, from 0 to 255, so it shows how strong the biggest change is even when the tolerance hides it.

The percentage is a pixel count, not a similarity score. It does not say how alike two photos look to a person. Pixels are compared at the same position, so the same content moved sideways counts as changed wherever it moved. Magenta marks each changed pixel on the mask.

Pixel tolerance and alpha mode

Pixel tolerance sets how large a change must be before a pixel counts. For each pixel the tool takes the largest difference across the compared channels, on a scale of 0 to 255, and counts the pixel only when that difference is greater than the tolerance. A pixel whose largest difference is 3 counts at tolerance 2 but not at tolerance 3.

At 0, any change counts. Raise the tolerance to ignore faint changes, then read the maximum channel delta to see how large the remaining ones are. No separate filter skips anti-aliased edges.

The RGBA option compares color weighted by alpha, plus alpha itself, so fully transparent pixels match whatever hidden color they store. Composite on white compares how both images look on a white background. A half-transparent black pixel and an opaque gray pixel of 127, 127, 127 then match, while the RGBA option counts them as changed.

Images with different sizes

Alignment starts at Require equal dimensions. Two images of different width or height then stop with an error that suggests Top-left or Center. Both of those options place the images on a canvas as wide as the wider image and as tall as the taller one, and fill the empty space with transparent padding.

Nothing is resized, cropped or matched by content. Center rounds a half-pixel offset down, so a 2-pixel-wide image on a 5-pixel canvas starts at column 1.

Padding is part of the count. Compare a 1000 × 800 picture with a copy whose bottom 40 rows were cropped away, using Top-left, and 40,000 pixels change, 5.00% of the canvas. Those are the padding rows, where only the reference has pixels. Center would place the shorter copy 20 pixels down instead, so its content no longer lines up with the reference.

Mask, overlay and downloads

Preview & PNG export switches between Difference mask and Overlay. The mask is opaque magenta where pixels changed and transparent everywhere else, and the page shows it over a checkerboard. Overlay blends the two aligned images. The Comparison weight slider sets the mix: 0% shows the reference and 100% the comparison.

Moving the slider redraws the overlay but never changes the pixel count. With Composite on white selected, the overlay is fully opaque. While the overlay redraws, both download links stay hidden until the new file is ready.

Download PNG saves whichever view is selected, as image-diff-mask.png or image-diff-overlay.png, at the full size of the comparison canvas. The PNG keeps no metadata from your files. Download JSON report saves image-diff-report.json with the settings, canvas size, offsets, changed count, percentage, maximum channel delta and current overlay weight. It leaves out your file names.

Limits

The tool compares one decoded still frame of each file, after orientation, as 8-bit sRGB pixels. It does not compare metadata, file bytes, HDR precision or further animation frames, so a zero count does not prove that two files are identical. Browsers can decode the same file to slightly different pixels.

It finds changed pixels at the same position. It does not line up shifted or rotated content, find duplicates in a folder, score how similar two photos look or tell whether two faces belong to the same person.

PNG, JPEG, WebP, GIF and other images your browser can decode open here, and TIFF, AVIF and SVG files also open through decoders that ship with the page. An SVG is drawn without fetching external files. The tool sets no size limit, but a very large pair can exceed what your browser's canvas or memory allows. Cancel stops a comparison that takes too long.

Questions

How can I compare two images?

Choose the original under Reference image and the other version under Comparison image, then select Compare images. The page shows the share of changed pixels, the exact count and a magenta difference mask. Raise Pixel tolerance to ignore faint changes, and pick Top-left or Center under Alignment when the sizes differ.

How do I put two pictures side by side to compare?

As soon as you choose the images, both decoded pictures appear in their own boxes, next to each other on a screen wider than a phone. To see them in one frame, select Compare images, then choose Overlay and move the Comparison weight slider between 0% and 100%. The page has no drag slider that wipes one image across the other.

Can it tell whether two photos show the same person?

No. The tool compares pixels at the same position and reports how many changed. It does not look for faces, objects or shapes, so it cannot say whether two photos show the same person, and a high count only means that the pixel values differ. Face matching tools measure facial features instead.

Does my image leave this device?

No. Decoding both images, comparing them and building the PNG and JSON files all happen in your browser on this device. The tool does not upload or store your images. Reset releases the images and results, Cancel stops a comparison in progress, and leaving the page releases them too.