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.
Pick a small issue you can reproduce, then fix it with your AI coding agent.
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-10-19
More in Developer tools and infrastructure
An open-source TypeScript engine for calculating Zi Wei Dou Shu charts and consulting traditional references. It helps developers build charting and interpretation tools.
Forked 2026-10-18Last synced 2026-10-19License: MITDeveloper tools and infrastructureGitHub
ImHex is a hex editor for inspecting and editing binary files. Reverse engineers, programmers, and forensic users can search and patch bytes or describe file structures with its pattern language.
Forked 2026-10-17Last synced 2026-10-19License: GPL-2.0Developer tools and infrastructureGitHub
Numa is a portable DNS resolver for local development and privacy. It blocks ads, gives local services names like frontend.numa, and runs without depending on a cloud account.
Forked 2026-10-17Last synced 2026-10-19License: MITDeveloper tools and infrastructureGitHub
Handwired turns ordinary JavaScript logic into differentiable neural-network-style calculations, so programs can run as matrix operations in JavaScript or WebGPU. It is for experimenting with GPU execution and optimization of code written in a traditional style.
Forked 2026-10-16Last synced 2026-10-19License: MITDeveloper tools and infrastructureGitHub