Perceptual Image Hash Calculator
Compute aHash, dHash, pHash and blockhash for images with Hamming distance similarity verdicts. Fully in-browser.
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 | Resize | Compression | Crop | Flip |
|---|---|---|---|---|
| aHash | Good | Good | Poor | Poor |
| dHash | Excellent | Excellent | Poor | Poor |
| pHash | Excellent | Excellent | Fair | Poor |
| blockhash | Good | Good | Fair | Fair |
Examples
Typical use
perceptual-image-hash-calculator inputscomputed resultPreview and copied output use the same computation.
Edge case
invalid or extreme inputclear inline error or clamped resultFailures 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
Step 1
Drop one or two images into the labeled zones
Step 2
Read aHash, dHash, pHash and blockhash as hex with bit grids
Step 3
Compare distances and verdicts; paste an external hash to check it
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
Related tools
APCA Contrast Calculator
Calculate directional APCA 0.1.9 Lc contrast scores and compare them with WCAG 2.1 ratios.
Barcode Generator
Generate barcodes in 8 formats (CODE128, EAN13, UPC, and more) — configure line width, height, and text display, then download as SVG or PNG.
Base64 Image Encoder
Open the Image workspace in Base64 Toolbox to resize and convert images to Base64 data URIs, then copy HTML, CSS, Markdown or JavaScript snippets.
Batch Image Resizer
Resize multiple images with width, height, percentage or max-dimension rules and renaming, privately.
BlurHash Generator
Encode an image into a compact BlurHash string and verify it with a live decode preview.
CSS Container Queries Lab
Generate CSS container queries and preview responsive component patterns