DevTools Logo

Perceptual Image Hash Calculator

Perceptual Image Hash Calculator

Compute aHash, dHash, pHash and blockhash for images with Hamming distance similarity verdicts. Fully in-browser.

Drop image A here or click to choose
Drop image B here (optional) or click to choose

64-bit conventions

aHash: 8×8 mean · dHash: 9×8 right-brighter gradient · pHash: 32×32 DCT with full 8×8 median · blockhash: 8×8 block projections. Alpha composites over white; EXIF orientation is respected.

No image hashed yet

Drop an image into slot A to see four perceptual hashes.

Robustness matrix

documented heuristics
Algorithm tolerance to resize, compression, crop and flip
AlgorithmResizeCompressionCropFlip
aHashGoodGoodPoorPoor
dHashExcellentExcellentPoorPoor
pHashExcellentExcellentFairPoor
blockhashGoodGoodFairFair

Examples

Typical use

Input
perceptual-image-hash-calculator inputs
Output
computed result

Preview and copied output use the same computation.

Edge case

Input
invalid or extreme input
Output
clear inline error or clamped result

Failures are visible rather than silently swallowed.

About this tool

Perceptual hashes fingerprint how an image looks, not its bytes. This tool computes four standard 64-bit hashes and compares two images with Hamming distance and verdict bands.

Conventions match imagehash: dHash compares right greater than left, pHash uses the full 8x8 DCT block with a median threshold. Thresholds are heuristics.

What this tool does not do

  • Conventions match imagehash: dHash compares right greater than left, pHash uses the full 8x8 DCT block with a median threshold. Thresholds are heuristics.

How to use this tool

  1. Step 1

    Drop one or two images into the labeled zones

  2. Step 2

    Read aHash, dHash, pHash and blockhash as hex with bit grids

  3. Step 3

    Compare distances and verdicts; paste an external hash to check it

  4. Step 4

    Review the robustness matrix before trusting a verdict

Use cases

Everyday workflow

Perceptual hashes fingerprint how an image looks, not its bytes. This tool computes four standard 64-bit hashe

Common mistakes

Mistake:Ignoring the stated assumptions.

Fix:Read the notes in the output panel before applying the result.

Frequently asked questions

What is the difference between aHash, dHash and pHash?

aHash thresholds an 8x8 mean, dHash compares adjacent gradients, pHash thresholds low-frequency DCT coefficients.

What Hamming distance means same image?

Zero is identical; 5 or less for aHash/dHash and 10 or less for pHash/blockhash is a typical near-duplicate band.

Are these hashes cryptographic?

No. Perceptual hashes describe appearance; they are not secrets and can collide.

References & standards