pixelmatch
A small, simple and fast JavaScript library for comparing images pixel by pixel. It was made for screenshot comparison in tests and can ignore anti-aliasing differences.
Share on XLicense: ISC
Overview
pixelmatch is a small JavaScript library that compares two images pixel by pixel. It was originally made to compare screenshots in tests. It detects anti-aliased pixels and uses a perceptual color difference metric. It has no dependencies, is only a few hundred lines of code, and works on raw typed arrays of image data, so it runs in Node and in browsers. You pass two images, an output buffer, the size and a threshold, and get the number of differing pixels.
Key features
- Pixel-level image comparison returning a count of differing pixels
- Detects anti-aliased pixels to reduce false differences
- Perceptual color difference using the OKLab color space
- No dependencies, runs in Node and browsers
Best for
Teams that want visual regression checks in tests, such as comparing screenshots, with a very small dependency-free tool.
- Upstream
- mapbox/pixelmatch
- Fork on GitHub
- Guo-astro/pixelmatch
- Upstream stars
- 7.0k
- Category
- Developer tools and infrastructure
- Language
- JavaScript
- License
- ISC
- Forked
- 2020-11-01
- Sync status
- In syncLast synced 2026-09-29
More in Developer tools and infrastructure
DBX is a lightweight, cross-platform database client for connecting to and managing over 100 database types. It offers desktop, Docker, and CLI access, plus AI assistance and an MCP Server for database workflows.
Forked 2026-09-29Last synced 2026-09-29License: Apache-2.0Developer tools and infrastructureGitHub
Escrcpy is a graphical desktop interface for scrcpy that mirrors and controls Android devices. It helps developers and testers manage connected devices, including wireless and multi-device workflows.
Forked 2026-09-29Last synced 2026-09-29License: Apache-2.0Developer tools and infrastructureGitHub
Lightpanda is a headless browser built from scratch for AI agents and automation. It aims to be lighter and faster than Chromium and works with Playwright and Puppeteer.
Forked 2026-09-28Last synced 2026-09-29License: AGPL-3.0Developer tools and infrastructureGitHub
A self-hosted open-source monitoring platform for servers, apps and infrastructure. It offers uptime monitoring, distributed checks, incident tracking and alerts.
Forked 2026-09-28Last synced 2026-09-29License: MITDeveloper tools and infrastructureGitHub