CheckOps
pixelmatch
pixelmatch is an ISC-licensed, dependency-free JavaScript library from Mapbox for fast pixel-level image comparison with anti-aliasing detection and a perceptual colour difference metric.
Latest public signals
Not refreshed yet. Refresh reads the public site and, when the entry has a GitHub repository, the latest release.
Introduction
pixelmatch is ‘a small, simple and fast JavaScript pixel-level image comparison library, originally created to compare screenshots in tests’, according to its README. It is only a few hundred lines of code, has no dependencies, and works on raw typed arrays of image data, so it is very fast and runs in Node.js and browsers.
It features accurate anti-aliased pixel detection and a perceptual colour difference metric, and writes a diff image highlighting changed pixels. Many visual testing tools use it as their comparison engine, including jest-image-snapshot and Visual Regression Tracker. A command-line tool is included.
Version 8.0.0 was released in October 2026.
In the quality loop it is a building block for custom visual checks.
The source code is at mapbox/pixelmatch on GitHub under the ISC licence, with about 7,000 stars; the most recent commit was on 6 October 2026.
Features
- Pixel comparison: Count differing pixels.
- Anti-aliasing detection: Reduce false positives.
- Perceptual metric: Colour difference that matches perception.
- Diff output: Highlight changes.
- Node and browser: Works on typed arrays.
Pros
- Tiny and fast: No dependencies.
- Free to use: Open source under the ISC licence, so the core tool costs nothing to use.
- Actively maintained: The repository had commits as recent as 6 October 2026.
- Community: About 7,000 GitHub stars.
Cons
- Library only: No baseline management or UI.
- Same-size images: Inputs must match dimensions.
Usage and Links (Example)
import pixelmatch from 'pixelmatch';
const numDiffPixels = pixelmatch(img1, img2, diff, 800, 600, { threshold: 0.1 });
Resources:
Pricing
pixelmatch is free and open source under the ISC licence.
Recommended for?
- Developers building custom visual checks.
- Not a fit if you want a full visual testing workflow.
Conclusion
pixelmatch is the standard small library underneath many visual testing tools.
On CheckOps, pixelmatch is filed under the Unit testing and End-to-end & functional stages. Related tools listed here include ODiff, jest-image-snapshot, reg-suit, Visual Regression Tracker, BackstopJS and WebdriverIO Visual Service. Before choosing, compare them on licence, supported languages and platforms, hosting model, and how well each fits your existing CI pipeline. Facts on this page were checked against the official website, documentation and repository on 11 November 2026; statements the vendor makes about its own product are marked as vendor claims.
Compare
CheckOps pages that put pixelmatch next to related tools. There is no paid placement on these lists.
Alternatives
Other tools on CheckOps that cover similar ground. Open a page, or compare one with pixelmatch side by side.
OODiffODiff is an MIT-licensed, very fast native image comparison tool written in Zig with SIMD optimisations, with a Node.js API, cross-format support, anti-aliasing detection and ignore regions.Compare with pixelmatch
Jjest-image-snapshotjest-image-snapshot is an Apache-2.0 Jest matcher from American Express that compares images against stored baselines, the image equivalent of Jest snapshot testing, used widely for visual regression tests.Compare with pixelmatch
Rreg-suitreg-suit is an MIT-licensed command-line tool for visual regression testing that compares images, stores snapshots in cloud storage such as S3 or GCS, and reports differences on pull requests through plugins.Compare with pixelmatch
VVisual Regression TrackerVisual Regression Tracker is an Apache-2.0, self-hosted visual testing service that compares screenshots from any framework against baselines, with ignore regions, baseline history, several comparison engines and SDKs for JS, Java, Python and .NET.Compare with pixelmatch
BBackstopJSBackstopJS is an MIT-licensed visual regression testing tool for web apps that compares screenshots over time, with Playwright or Puppeteer scripting, Docker rendering and an in-browser report; its README says it needs a new maintainer.Compare with pixelmatch
WWebdriverIO Visual ServiceThe WebdriverIO Visual Service (@wdio/visual-service) is an MIT-licensed plugin that adds screenshot comparison for screens, elements and full pages to WebdriverIO tests on web, mobile web and native apps.Compare with pixelmatch