Compare two images and find the differences

Mark the pixels that changed, see the percentage and the area, and download the result as a PNG. Runs on your device.

How it works

  1. Add image A and image B
  2. Pick Highlight, Side by side or Overlay and a threshold
  3. Press Compare images, then download the PNG

How two images are compared

To compare two images, add both here: the page lines them up, marks every pixel whose colour changed by more than a threshold, and reports the percentage of pixels that differ and the box around the changes. A pixel counts as different only when its change is strictly more than the threshold, which starts at 10 on a scale of 0 to 255. At 0, any change at all counts. The first image you add is image A and the second is image B; the move buttons in the list swap them. Highlight draws image A faded to 35% on white and paints every differing pixel red. Side by side puts A and B next to each other with a 16 pixel gap. Overlay draws B over A at the opacity you set, from 0 to 100. Transparent areas are drawn on white. Whatever the view, the numbers are always worked out from the pixels.

Largest channel or colour distance

Each pixel has four values from 0 to 255: red, green, blue and alpha (opacity). Largest channel takes the biggest of the four changes. Colour distance takes the root mean square of the four changes. Say a pixel is 200, 100, 50 in A and 205, 100, 40 in B. The changes are 5, 0 and 10, with alpha unchanged. The largest channel is 10, so the pixel counts as different at a threshold of 9 but not at 10. The colour distance is the square root of (25 + 0 + 100 + 0) divided by 4, which is 5.59, so it counts at a threshold of 5 but not at 6. Largest channel is the stricter choice for a single bright change. Colour distance is the gentler one for a spread of small changes.

When the images are not the same size

You choose. Top left does no scaling: the images line up at the top left corner, the area compared is the larger width and the larger height, and area that only one image covers counts as different. Scale B to A resizes image B to the size of A first, which stretches it if the shapes differ, then compares. Use Top left for a screenshot where something was added or the canvas was cropped. Use Scale B to A for the same picture saved at two sizes. To keep the page responsive, each image is compared at no more than 12,000,000 pixels, or 6,000,000 on a phone. Larger images are scaled down by the same amount and the page says so before and after the comparison.

What this does not do

It compares pixels, not meaning. If an object moves by one pixel, the whole edge of it is marked. A JPEG saved twice differs slightly everywhere, which is why the default threshold is 10 and not 0. The tool does not line up shifted or rotated images, does not recognise objects, and does not compare text; for two pieces of text use a text diff. Percentages are shown to 2 decimals: 1,234 of 1,000,000 pixels is 0.12%, and anything under 0.01% reads as less than 0.01%. The box around the changes is the smallest rectangle that holds every differing pixel, so one change in each corner makes it as large as the image.

Where your images go

Nothing is uploaded. Each image is decoded by your browser, drawn on a canvas in this tab and read pixel by pixel, one image at a time. The PNG is made in the same tab. The page counts visits with Google Analytics, using rough groups such as file size ranges, never a file name or an image. Your choice of view, threshold and size handling is saved on this device; the images are not.

Frequently asked questions

How do I find the differences between two images?

Add both images, keep Highlight selected and press Compare images. Every pixel that changed by more than the threshold is painted red on a faded copy of image A, and the page shows the percent that differ and the box around the changes. Download the PNG to share it.

What threshold should I use?

Use 0 to count any change, for example two PNG screenshots that should be identical. Keep the default 10 for photos and JPEGs, because saving a JPEG again can change many pixels by a few levels. Raise it to 30 or 50 to see only strong changes such as new objects or text.

Why does it say almost every pixel changed?

The images are probably shifted by a pixel, saved at different sizes, or one was resized. With Top left and different sizes, the extra area counts as different. Try Scale B to A if both show the same picture at two sizes. A shift of one pixel marks every edge, which this tool does not correct.

Can I compare images of different sizes?

Yes. Top left lines them up at the corner with no scaling and counts the uncovered area as different. Scale B to A resizes the second image to the first before comparing, for example a 480 by 360 copy against a 1024 by 768 original. The page shows both sizes before you compare.

How is the percentage worked out?

It is the number of differing pixels divided by the number of pixels in the compared area, which is the larger width times the larger height. If 1,234 of 1,000,000 pixels differ, the result is 0.12%. The count and the total are shown under the percentage so you can check it.

Are my images uploaded?

No. The images are processed in your browser and not uploaded. Both are decoded and compared in this tab, and the PNG is made there too. Only your view, threshold and size choice are saved on this device, never the images.