Codepackr / image / Side-by-Side Image Comparator

Side-by-Side Image Comparator

Compare two images side-by-side or via diff overlay to detect visual discrepancies.

Client-Side Execution & Privacy Guarantee

This utility executes 100% locally in your web browser. Your inputs, tokens, queries, and data payloads are never transmitted to any external server or backend.

Visual comparison reveals differences that are hard to spot by eye. The tool places two images next to each other or generates a difference overlay that highlights changed pixels.

Both the side-by-side view and the diff calculation run locally. You can check screenshots, design iterations, or rendered output without uploading the files to any server.

Side-by-side viewing

The two images are displayed at the same scale. A movable divider or synchronized pan lets you inspect corresponding regions. When dimensions differ, the smaller image is letterboxed or the view is scaled to fit.

This mode is useful for overall layout checks. Small color or anti-aliasing differences may still be difficult to see without the overlay.

Pixel-difference overlay

The overlay computes the absolute difference for each corresponding pixel. Changed areas are typically shown in a high-contrast color (often red or magenta) while identical regions remain dimmed or grayscale.

A tolerance threshold can ignore minor variations caused by compression or anti-aliasing. Raising the threshold reduces noise; lowering it shows every single-pixel change.

Alignment and size handling

Accurate diffs require the images to be the same size and roughly aligned. The tool reports dimension mismatches and can optionally scale one image to match the other before comparison.

Sub-pixel shifts or different cropping will produce large difference regions even when the content is otherwise identical. Align or crop the sources first for the cleanest result.

When to use this tool

  • Verifying that a CSS or rendering change did not introduce visual regressions
  • Comparing two screenshots of the same page taken at different times
  • Checking whether an image export matches the original design file
  • Spotting unintended edits in a photo or graphic
  • Confirming that a compression step preserved the expected appearance

How to use the Side-by-Side Image Comparator

  1. Load the reference (expected) image.
  2. Load the candidate (actual) image.
  3. Switch between side-by-side and overlay modes.
  4. If sizes differ, choose whether to scale the second image to match.
  5. Adjust the difference threshold to suppress or reveal minor variations.
  6. Pan and zoom to inspect highlighted regions.
  7. Export the overlay image if you need to share the differences.

Worked examples

Identical images

Input
Two copies of the same 800x600 PNG
Output
Overlay shows no highlighted pixels; side-by-side view is uniform

A perfect match produces an empty difference map.

Single-pixel color change

Input
800x600 image and the same image with one pixel changed from white to black
Output
Overlay highlights a single pixel (or a small cluster after thresholding) at the changed location

Low threshold settings reveal the exact pixel; higher thresholds may hide it if it falls below the cutoff.

Common mistakes and tips

  • Always compare images of identical dimensions for the most meaningful overlay.
  • JPEG compression introduces small pixel variations; raise the threshold slightly when both files are JPEGs.
  • A large solid block of difference usually means a shift, crop, or scale mismatch rather than content changes.
  • Use the side-by-side view first to confirm overall alignment, then switch to overlay for detail.
  • The overlay is a diagnostic image; it is not a blended or merged result.

Frequently asked questions

Why do two images that look the same show differences?

Compression, different export settings, anti-aliasing, or sub-pixel positioning can alter individual pixel values even when the visual result appears identical.

Can the tool compare images of different sizes?

Yes, but it will either letterbox or scale one image. Scaling can itself introduce differences, so matching sizes beforehand is preferred.

What does the difference threshold control?

It sets the minimum per-channel difference that is considered a change. Values below the threshold are treated as identical.

Is the comparison perceptual or pixel-exact?

The overlay is pixel-exact (absolute difference). It does not apply perceptual color metrics.

Can I download the highlighted differences?

Yes. The overlay view can be exported as an image that shows the highlighted regions.