Screenshot comparison tools
Tools that compare two screenshots and tell you what changed — from pixelmatch and ODiff as libraries, through reg-suit and BackstopJS as CLIs, to hosted platforms with review workflows.
"Screenshot comparison tool" describes three quite different things, and picking from the wrong layer is the usual mistake. You may want a library to call from your own code, a CLI that manages baselines, or a platform where a team reviews and approves differences.
| Layer | You get | You still build | Examples |
|---|---|---|---|
| Library | A diff function | Capture, baselines, storage, reporting, review | pixelmatch, ODiff, Resemble.js |
| CLI / toolkit | Diffing, baselines, a static report | Capture (sometimes), review workflow | reg-suit, BackstopJS |
| Platform | The whole loop including approval | Coverage authoring | Chromatic, Argos, Percy, Applitools |
Libraries: a diff function
Best for: Adding image comparison to code you are already writing.
- License
- ISC (6.9k stars)
- Pricing
- Free
The default choice at this layer, and worth knowing about even if you buy a platform, because several tools on this page use it underneath. Pair it with pngjs to read and write files and you have a working comparison step in about twenty lines.
- Small, fast, and zero-dependency
- Accurate anti-aliasing detection, on by default and disableable via
includeAA - The library Playwright uses internally, so behaviour is well understood
- Straightforward threshold and diff-output options
- A function, not a tool — no capture, baselines, storage, or reporting
- You handle image decoding yourself, typically with pngjs
import { readFileSync, writeFileSync } from "node:fs";
import { PNG } from "pngjs";
import pixelmatch from "pixelmatch";
const baseline = PNG.sync.read(readFileSync("baseline.png"));
const current = PNG.sync.read(readFileSync("current.png"));
const { width, height } = baseline;
const diff = new PNG({ width, height });
const changed = pixelmatch(baseline.data, current.data, diff.data, width, height, {
threshold: 0.1, // per-pixel colour tolerance
includeAA: false, // ignore anti-aliased pixels
});
writeFileSync("diff.png", PNG.sync.write(diff));
console.log(`${changed} pixels differ (${((changed / (width * height)) * 100).toFixed(2)}%)`);ODiff (MIT, 3.2k stars) is the alternative worth knowing when volume is the constraint. It is a native binary — originally OCaml, since rewritten in Zig with SIMD optimisations, so older comparisons describing it as an OCaml tool are out of date. Its README benchmarks a full-size website screenshot comparison at roughly 1.17s against pixelmatch's 7.71s, and claims about 6x the speed of both ImageMagick and pixelmatch. If you are diffing thousands of full-page captures a day, that difference is CI minutes. Resemble.js is the older browser-capable option, useful when the comparison has to happen client-side.
CLIs: diffing plus baselines
Best for: Teams that already capture screenshots and want Git-aware baselines.
- License
- MIT (1.3k stars)
- Pricing
- Free, plus your own S3 or GCS costs
The best answer at this layer, and architecturally better than most platforms in one specific way: baselines are keyed to commits and stored in your own object storage, so they never bloat the repository and never go stale relative to a branch.
- Baselines keyed to Git history instead of committed to the repository
- Capture-agnostic — bring images from Playwright, Puppeteer, Storybook, anything
- Publishes HTML reports to S3 or Google Cloud Storage
- Notifies GitHub, GitLab and Slack
- Actively maintained
- Does not capture screenshots — this is the comparison half only
- You wire capture, storage and CI together yourself
- Review is a static report rather than a collaborative approval flow
Best for: Self-hosted page-level comparison with capture included.
- License
- MIT (7.2k stars)
- Pricing
- Free
The most complete free option that includes capture, and for years the default. Weigh the maintainer notice before starting something large on it — for an existing suite or a small stable surface it remains perfectly serviceable.
- Captures and compares in one tool, unlike reg-suit
- Puppeteer for Chrome; Playwright for Firefox and WebKit
- Docker rendering for consistency between local and CI
- Declarative JSON scenarios are easy to generate programmatically
- The README currently states the project needs a new maintainer or owner
- One hand-written scenario per page
- Baselines live in Git, with no collaborative review
Platforms: comparison plus a review workflow
Once more than one person needs to judge a difference, a static HTML report stops being enough. You need somewhere differences are ranked, discussed, and approved with a record of who approved them. That is what the hosted tools sell, and it is a real product rather than a wrapper around a diff.
- Argos — free to 5,000 screenshots/mo, then $100/mo for 35,000. Open-source core, cheapest hosted review UI.
- Chromatic — free to 5,000 billed snapshots (Chrome only), Starter $179/mo. Best-in-class if coverage lives in Storybook.
- Applitools — Starter $667/mo billed annually. Perceptual comparison rather than pixel diffing.
- Percy — free to 5,000 screenshots/mo; paid tiers are contact-sales and the pricing page returned a 404 when checked.
Full breakdown of each in 10 visual regression testing tools, compared.
Choosing your layer
- You are writing a script and need a diff — pixelmatch, or ODiff if the images are large and numerous.
- You already capture screenshots and need baselines — reg-suit.
- You need capture and comparison, self-hosted — BackstopJS, with the maintenance caveat noted.
- More than one person reviews the differences — a platform. The review workflow is the product.
- Nobody wants to author the captures — that is a different problem: coverage, not comparison.
That last point is the one worth sitting with. Every tool above assumes you already know which screenshots to take. If your real gap is that nobody has time to write and maintain that list, no comparison tool at any layer solves it — see screenshot testing vs visual regression testing.
Frequently asked questions
What is the best screenshot comparison tool?
It depends which layer you need. pixelmatch is the best library for comparing two images from your own code. reg-suit is the best CLI for Git-keyed baselines when you already capture screenshots. For a team review workflow, Argos is the cheapest hosted option at $100/month for 35,000 screenshots.
How do you compare two screenshots programmatically?
Decode both PNGs, then pass their pixel buffers to a diffing library such as pixelmatch along with a threshold, which returns the count of differing pixels and writes a diff image. Enable anti-aliasing detection so rendering noise is not reported as a change.
What is the difference between a screenshot comparison tool and a visual regression testing tool?
A comparison tool diffs two images you supply. A visual regression testing tool adds everything around that: deciding what to capture, capturing it deterministically, storing approved baselines, and providing a review workflow where a human confirms each difference as intended or a bug.
Sources
- pixelmatch repositorychecked 2026-09-13
- ODiff repositorychecked 2026-09-13
- reg-suit repositorychecked 2026-09-13
- BackstopJS repositorychecked 2026-09-13
- Argos pricingchecked 2026-09-13
- Chromatic pricingchecked 2026-09-13