pngtoolskit.org
PNG and image utilities, in the browser
Say hi →

Find Duplicate Images

perceptual dHash · catches resized and recompressed copies · adjustable tolerance

Drop a folder of images and find the ones that are the same picture. This compares what the images look like, not their bytes — so it catches a 400 px copy of a 2000 px original, a JPEG re-save of a PNG, and a file that was renamed and re-exported, all of which byte-comparison and file hashing miss entirely.

Drop two or more images here

Drop a whole folder's worth — comparison is local

    no files
    Ready.

    How the matching works

    Each image is reduced to a 9×9 greyscale thumbnail, and every pixel is compared with the one to its right and the one below it: brighter gives a 1, darker gives a 0. That's 128 bits describing the image's structure of light and dark — a difference hash, or dHash, on both axes. Two images are then compared by counting how many of those 128 bits differ, which is the Hamming distance.

    Comparing on both axes matters more than it sounds. The usual single-axis dHash only looks rightward, which makes it blind to purely vertical structure — a top-to-bottom gradient compares equal to its right-hand neighbour everywhere and therefore hashes identically to a flat colour. Adding the downward comparison removes that whole class of false match.

    Because the hash comes from a tiny thumbnail, it's naturally immune to resolution, file format, compression quality and small colour shifts, while remaining sensitive to actual content. Matched files are grouped transitively — if A matches B and B matches C, all three appear in one group.

    Featureless images are a special case and are handled separately. A single flat colour has no light-and-dark structure at all, so its hash carries no information — every solid-colour image would otherwise match every other one. Images with no measurable contrast are detected and compared by their average colour instead, and are never grouped with textured images.

    Setting the tolerance

    0 means identical hashes: the same image, possibly at different sizes or in different formats. 1–10 is the useful working range for "this is the same photo" — it absorbs recompression and minor edits. 10–20 starts catching genuinely different but similar shots: consecutive frames from a burst, the same product on the same background. Above 25 produces false positives freely, because at that distance unrelated images with similar overall composition start colliding.

    Each group reports the closest distance found within it and flags the largest file, since that's normally the highest-quality copy and the one to keep. Verify before deleting anything — Image diff shows you pixel-level differences between two specific files.

    What it won't catch

    Worth being clear about the limits. dHash is sensitive to geometry: a cropped, rotated, flipped or mirrored copy has a completely different hash and will not match. It's also weakly sensitive to colour — two images identical in structure but recoloured, say the same icon in red and blue, will match as duplicates. And a heavily edited version of a photo may fall outside any sensible tolerance.

    Nothing is uploaded and nothing is deleted — the tool reports groups and leaves every action to you. It also has no access to your filesystem beyond the files you drop, so it can't scan a directory tree; for a whole photo library, a desktop tool is the right instrument.

    FAQ

    How many files can I compare?

    Comparison is every pair, so cost grows with the square of the count — a hundred files is ten thousand comparisons and still fast, since each is 64 bit tests. Hashing itself is the slower part, one decode per file.

    Will it match a cropped version?

    No. Cropping changes the structure the hash measures. This is a real limitation of perceptual hashing in general.

    Why are two different images in the same group?

    Tolerance too high, or they genuinely share a light-and-dark structure — two documents on white, two logos on the same background. Lower the tolerance.

    Can it delete the duplicates for me?

    No, and it shouldn't — a web page has no business deleting your files. It tells you which files match and which is largest; the decision is yours.

    Does it work across formats?

    Yes. PNG, JPG, WebP, GIF, AVIF and BMP all decode to pixels first, so a PNG and its JPEG export will match.