To find exact duplicate photos, compare file hashes: two files with the same MD5 or SHA-256 are byte-for-byte copies. To find near-duplicates (the same shot resized, re-saved or lightly edited), use an image hash that fingerprints what the picture looks like and count how many bits differ. We ran ten common edits on one photo to show which copies each method catches.
First decide what you're hunting. The same folder copied onto two drives gives exact duplicates, and a file hash finds them in seconds. A photo exported for Instagram, emailed smaller and screenshotted gives near-duplicates, and a file hash misses all of them. A practical order:
Our tool runs in your browser. Each image is drawn to a canvas no wider than 400 pixels, fingerprinted and compared. Nothing is uploaded.
An exact duplicate is the same file twice: same bytes, same hash, often a name like IMG_2041 (1).jpg. A near-duplicate shows the same picture in a different file. Resizing, re-compression, a brightness tweak or stripped metadata all rewrite the bytes, so to a file hash they're strangers.
Then there are similar photos: five burst shots of a kid blowing out candles, taken a fraction of a second apart. They're not copies, and which ones to keep is your call.
The method our tool uses is called average hash, or aHash. It's simple enough to explain in four steps:
Two images are compared by counting how many of the 64 bits differ. That count is the Hamming distance. Our tool puts two images in the same group when the distance is 10 or less.
Resizing and compression barely move the fingerprint. A flip or rotation moves the bright and dark regions and scrambles it.
We took one 640x427 JPEG of a temple roof, made ten versions, and computed MD5 plus the same 8x8 aHash our tool uses (in Python with Pillow). The last row is an unrelated control photo.
| Edit | MD5 match? | aHash distance (measured) | Caught by our tool at ≤10? |
|---|---|---|---|
| Exact file copy | Yes | 0 | Yes |
| Resized to 50% | No | 0 | Yes |
| JPEG re-save at quality 70 | No | 0 | Yes |
| Brightness +10% | No | 0 | Yes |
| Converted to grayscale | No | 0 | Yes |
| Cropped 5% off every edge | No | 2 | Yes |
| Cropped 10% off right and bottom | No | 5 | Yes |
| Small text watermark in a corner | No | 0 | Yes |
| Horizontal mirror | No | 26 | No |
| Rotated 90° | No | 32 | No |
| A different photo (control) | No | 36 | No |
These numbers come from one test image, so results will vary. Browsers also shrink images a bit differently; switching Pillow's resize filter moved the edge crop from 5 to 4 bits and the mirror from 26 to 22. MD5 caught only the untouched copy. The image hash caught every edit that kept the picture the right way round and missed both the mirror and the rotation.
Grayscale scored 0 because aHash already averages the color channels. A big, bold watermark would score higher than our small corner text.
Select a batch of images and get groups of lookalikes by filename. Nothing leaves your device.
Duplicate Image Finder →There's no official cut-off; ours is fixed at 10 of 64. Here's how we'd read the bands, as a heuristic rather than a standard.
| Distance (of 64 bits) | Usual meaning (heuristic) |
|---|---|
| 0 | Looks identical at 8x8: a copy, resize or re-save |
| 1 to 5 | Same photo with a light crop, filter or compression |
| 6 to 10 | Probably an edited copy; review before deleting |
| 11 to 20 | Similar scene, burst shot or heavy edit; rarely a true duplicate |
| 21 to 32 | Mostly unrelated, or a flipped or rotated copy |
| Above 32 | Different photos (unrelated images tend to land near 32) |
Unrelated photos hover around 32 because each bit is roughly a coin flip. Plain images, like product shots on white, can land closer than they should.
Often, yes. Since iOS 16, the iPhone Photos app has a Duplicates collection under Collections, then Utilities. Tap Merge and Photos keeps one copy, combining the best quality version with the relevant data from the others, and moves the rest to Recently Deleted. Apple says the scan needs the phone locked and on power and can take up to a few days on a big library. Macs got the same Duplicates collection in macOS Ventura, and deleted items stay recoverable for 30 days.
Google Photos checks for exact copies when you back up, so uploading the same unchanged file twice shouldn't give you two copies. It doesn't search your existing library for near-duplicates, though, and an edited, resized or re-dated copy counts as a new file.
On Windows, third-party guides say newer versions of Microsoft Photos flag exact duplicates, but we couldn't confirm that from Microsoft.
Saving space? Run the keepers through an image compressor too.
Use a file hash for proof two files are identical, and an image hash to find the same picture in different clothes. Scan, review each group, keep the best copy, and wait a week before emptying the trash.
For exact copies, compare file hashes: identical files give identical MD5 or SHA-256 values. For photos that were resized, re-saved or lightly edited, use a perceptual hash tool that compares what the images look like.
A file hash like MD5 changes completely if a single byte changes. Resizing, re-saving as JPEG or stripping metadata rewrites the bytes, so the hash no longer matches even though the picture looks the same.
Our tool treats two 64-bit average hashes as a match at 10 differing bits or fewer. As a rough rule, 0 to 5 is almost always the same picture, 6 to 10 is usually an edited copy, and above 20 is usually a different photo. It's a heuristic, so review each group.
A simple average hash can't. In our test a horizontal mirror scored 26 bits apart and a 90 degree rotation scored 32, both far past the threshold of 10.
Yes. Since iOS 16, the Photos app lists detected duplicates under Collections, Utilities, Duplicates, and you can merge them. Apple says indexing can take up to a few days and runs while the phone is locked and charging. Mac Photos gained the same Duplicates collection in macOS Ventura.