# mapbox/pixelmatch

The smallest, simplest and fastest JavaScript pixel-level image comparison library

Repository: https://github.com/mapbox/pixelmatch
Canonical: https://ross.abutalabs.com/products/pixelmatch
Language: JavaScript
License: ISC
License Family: permissive
Topics: image-comparison, testing-tools, diff
Last push: 2026-07-07T08:13:13+00:00

## Health v2 (maintenance only)
Score: 89/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 91, release rhythm 81, longevity 100
- inputs: {"age_days": 3977, "days_push": 57, "days_rel": 126, "gap_med": 2, "n_releases_24m": 4}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 6931, forks 323 (observed 2026-08-28T04:09:51.482029+00:00)

## What it is
A tiny, dependency-free JavaScript library for pixel-level image comparison, originally built for comparing screenshots in tests. It works on raw typed arrays in both Node and browsers, with anti-aliased pixel detection and perceptual (OKLab) color difference metrics.

## Use cases
- compare screenshots in automated tests
- generate visual diff images of two images
- detect pixel differences between PNG images in Node
- visual regression testing for web UIs
- compare image data in the browser
- ignore anti-aliased pixels when diffing images

## When to choose
- you need a fast, zero-dependency pixel diff that works on raw image data
- you want perceptually accurate comparison that handles anti-aliasing
- you need it to run in both Node and browsers
- you want a diff image highlighting changed pixels

## When to avoid
- you need to decode/encode image files yourself (it only compares raw pixel arrays)
- you need image resizing or dimension mismatch handling
- you need a full visual regression framework with reporting and baselines

## Facets
- artifact type: library
- maturity: stable
- function: image-processing, testing
- domain: image-processing, testing, developer-tools
- platform: browser
- tags: pixel-diff, visual-regression, screenshot-testing, zero-dependency, nodejs, javascript

## Member repositories
- mapbox/pixelmatch (main) score 89

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:51.482029+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:41:15.995244+00:00, confidence not recorded.
  - readme: https://github.com/mapbox/pixelmatch (fetched 2026-08-28T04:09:51.482029+00:00, sha d9592c8fa6d2)
  - registry_npm: https://registry.npmjs.org/pixelmatch (fetched 2026-08-29T08:37:18.157516+00:00, sha 6ea1232a6db2)
- Data as of 2026-08-30T08:39:29.467469+00:00.
