Tool guide
About this tool.
- Pixel Diff compares two images of the same size pixel by pixel. It reports the width, height and number of changed pixels as JSON and creates pixel-diff.png, a map where changed pixels are magenta and unchanged pixels are transparent.
- A pixel counts as changed when its largest red, green, blue or opacity difference is above Difference threshold.
- Check visual regression screenshots, rendered charts or exported icons before and after a change.
- Confirm that an optimization, conversion or refactor left the pixels unchanged, or find exactly where they differ.
Choose the Before image and the After image; both must have the same width and height.
Set Difference threshold from 0 to 255: 0 counts every change, and about 10 ignores slight compression noise.
Run the comparison and read changedPixels in the result.
Download pixel-diff.png and lay it over either image to see where the changes are.
- The same image twice, threshold 0 → "changedPixels": 0.
- 32 × 32 blue square vs the same square with an 8 × 8 red block → "changedPixels": 64.
- Blue rgb(0 100 255) vs rgb(6 106 255), threshold 10 → 0 changed pixels.
- The same pair with threshold 0 → 1024 changed pixels.
- Red vs blue 32 × 32 squares, threshold 50 → 1024 changed pixels.
- A fully transparent 40 × 40 image vs an opaque black one, threshold 50 → 1600 changed pixels.
- 32 × 32 image vs 50 × 50 image → error: Images must have the same dimensions.
- Images are compared on your device; screenshots are not uploaded.
- Threshold is a whole number from 0 to 255; decimals are rounded down and values outside the range are clamped.
- Images are never scaled or aligned, so even a one-pixel difference in size is refused.
- Changed pixels are drawn opaque #ff0050 in pixel-diff.png; all other pixels are fully transparent.
- Lossless PNG screenshots give the cleanest result; JPEG noise may need a higher threshold.