Pixels drift.
Assertions don't notice. Screenshots do.

Learn how visual regression testing works and compare the existing tools. Help us shaping one run manifest standard that any tool can write and any reporting/reviewing library can read.

Go deeper

Once the basics are in place, the place to continue.
Types of visual diffing
Exact, tolerance-based, shift-tolerant, structural, hash-based and layout-aware comparison: what each type measures, what it ignores and which to pick.

The tools

Every tool in one comparison, for your convenience.
  • Playwright toHaveScreenshot

    Kind
    runner
    Pricing
    free
    Baselines
    repository
    Manifest
    converter
  • pixsame

    Kind
    runner
    Pricing
    free tier, paid plans
    Baselines
    repository or service
    Manifest
    writes it
  • Percy

    Kind
    hosted review
    Pricing
    free tier, paid plans
    Baselines
    service
    Manifest
    none
  • BackstopJS

    Kind
    runner
    Pricing
    free
    Baselines
    repository
    Manifest
    converter

Which diff algorithm fits you?

Exact pixels, pixelmatch, Resemble.js, SSIM and a perceptual hash answer different questions. Pick by situation, with every claim measured on real example images.
  • Every pixel must match

    Exact pixels

    Counts the one-letter typo (0.07% of the pixels), and also 4.30% for noise nobody can see.

  • Text renders slightly differently across machines

    pixelmatch

    Sub-pixel text shift: exact counts 2.60%, pixelmatch 0.66% (1.46% with anti-aliasing detection off).

  • A color must not drift, even slightly

    pixelmatch, low threshold

    A three-point color drift: pixelmatch at its default threshold counts 0%, with threshold 0 2.35%; SSIM reads 1.0000.

  • Images go through JPEG or another lossy step

    SSIM

    JPEG at quality 60: exact flags 61.90% of the image, pixelmatch 1.80%, SSIM 0.9953.

  • You want one number a person can read

    SSIM

    An added cookie notice scores 0.9573, a clean copy 1. But a one-letter typo scores 0.9986: a mean hides small local changes.

  • Is it still the same picture? Sizes may differ

    Perceptual hash

    Noise and JPEG: 0 / 64 bits differ. Added element: 18 / 64. Different heights: 26 / 64. A typo: 0 / 64.