Image Hash Checker: SHA-256 and Perceptual Hash
Drop an image to get its SHA-256 and a 64-bit perceptual hash. The SHA-256 identifies the exact file. The perceptual hash identifies the picture, so you can tell whether two files show the same image. Everything runs in your browser, and your images are not uploaded.
Drop your images here
One image to get its hashes, two or more to compare them
Your images stay on your device. Nothing is uploaded.
SHA-256 and perceptual hash: what is the difference?
The SHA-256 is a fingerprint of the bytes of the file. If one byte changes, the whole hash changes. Use it to check that two files are exact copies, or that a download is not damaged.
The perceptual hash is a fingerprint of the picture that you see. This page uses a difference hash (dHash): it shrinks the picture to a 9 by 8 grid of gray cells and writes one bit for each pair of neighbours, 64 bits in all, shown as 16 hex characters. Use it to find the same picture in a different file, for example after a resize or a new save.
How to compare two images
- Drop two or more images on the box. You can add more later.
- Each image shows its SHA-256 and its perceptual hash.
- Every image after the first shows the Hamming distance to the first one. This is the number of bits that differ, from 0 to 64.
- Read the verdict: same picture for 0 to 5 bits, similar for 6 to 14 bits, different for 15 bits or more.
The limits are a rule of thumb. A crop, a rotation or a mirror image can give a large distance for the same subject. HEIC files may not open in your browser: the page then shows only the SHA-256 and says that it cannot read the pixels. For an animated GIF, the hash is of the first frame.
What happens to the hashes when you clean a photo
Photos have hidden data, such as location and camera details. When you clean a photo with WipePic, the file loses that data, so its bytes change and its SHA-256 changes. WipePic does not re-encode the picture, so the pixels do not change and the perceptual hash stays the same. Drop the original and the cleaned copy here to see it.
If you also convert the photo to another format, the pixels change. Both hashes change then. The perceptual hash usually moves by only a few bits. See the other WipePic tools for more ways to check a photo.
Questions
How do I get the SHA-256 of an image?
Drop the image on the box above. The page reads the file in your browser and shows its SHA-256 as 64 hex characters. The hash is of the exact bytes of the file, so a copy of the file gives the same hash, and any change to the file gives a different one.
What is a perceptual hash?
A perceptual hash is a short fingerprint of how a picture looks. This page makes a 64-bit difference hash (dHash): it shrinks the picture to a tiny gray grid and records, for each cell, whether it is brighter than its neighbour. Pictures that look alike get hashes that are close to each other. Two files with the same pixels get the same hash, even if their bytes differ.
How do I compare two images?
Drop both images. The page counts the bits that differ between the two perceptual hashes. This is the Hamming distance. A distance of 0 to 5 out of 64 bits is the same picture, 6 to 14 is similar, and 15 or more is different. These limits are a rule of thumb. Cropping, rotating or mirroring a picture can change the hash a lot.
Why does the SHA-256 change after I remove metadata, but the perceptual hash does not?
WipePic removes hidden data such as location, camera details and dates from the file. The bytes of the file change, so the SHA-256 changes. WipePic does not re-encode the picture, so the pixels stay the same and the perceptual hash stays the same. If you convert a photo to another format, the pixels change, so both hashes can change, the perceptual hash usually only by a few bits.
Why can I not get a perceptual hash for my HEIC photo?
The page needs your browser to decode the picture. Many browsers cannot decode HEIC. In that case the page still shows the SHA-256, because it only needs the bytes of the file, and it says that it cannot read the pixels. To get a perceptual hash, convert the photo to JPEG or PNG first, or try a browser that can open HEIC.
Are my images uploaded?
No. The hashes are computed in your browser, and your images and file names are not uploaded. WipePic uses Google Analytics for visit statistics, but the images never leave your device.
