Images and Photos

Cleaning Up Duplicate Images: Perceptual Hashing and AI Similarity Explained

Why duplicate images pile up, how perceptual hashes and AI embeddings find them, choosing which copy to keep and cleaning up safely.

Saizul Amin
Saizul Amin2 Nov 2026 · 3 min read
Cleaning Up Duplicate Images: Perceptual Hashing and AI Similarity Explained

Cleaning Up Duplicate Images: Perceptual Hashing and AI Similarity Explained

Image libraries grow copies quietly. A logo is exported at five sizes, photos are imported twice from the same phone, a design goes through ten slightly different versions, a burst produces thirty almost identical frames. Over time, duplicates waste storage, slow down searches and make it hard to know which file is final. Here is how modern tools find them, and how to clean up safely.

Why simple comparison is not enough

Comparing files byte by byte finds only exact copies. A resized image, a JPEG re-saved at a different quality or a PNG converted to JPEG has completely different bytes but looks identical. To find these, tools compare what the images look like, not their bytes.

Perceptual hashing

A perceptual hash shrinks an image to a tiny greyscale grid, for example 9 by 8 pixels, and records whether each pixel is brighter than its neighbour. The result is a 64-bit fingerprint. Visually identical images, even at different sizes or qualities, have the same or nearly the same fingerprint. The number of differing bits, the Hamming distance, measures how different two images look:

  • 0: practically identical;
  • 1 to 6: near duplicates, such as recompressed or lightly edited copies;
  • 10 or more: usually different images.

Hashing is very fast and precise, ideal for true duplicates.

AI similarity

AI models like CLIP turn each image into an embedding, a list of numbers describing what the image shows. Images of the same scene or design end up close together even if colours, crops or text differ. This catches versions and variations that hashing misses, such as a banner in three colourways or several shots of the same product. It also groups images that merely look alike, so review these groups carefully.

Choosing which copy to keep

  • Largest resolution: keeps the highest quality original, good for photos and graphics.
  • Sharpest: best for burst photos, where the clearest frame wins.
  • Newest: suits design exports, where the latest version is usually final.

Always look at the group before accepting a suggestion: sometimes a smaller crop is the version actually used.

Safe clean-up

  1. Back up the folder first.
  2. Review groups and mark keepers.
  3. Export a list of files to discard.
  4. Delete them yourself, or move them to an archive folder for a few weeks before deleting.
  5. For photo apps with their own databases, delete through the app.

Preventing duplicates

  • Import photos from each device once, using one tool.
  • Use clear naming for exports, such as logo-600px.png.
  • Keep design versions in a versions folder and only finals in the main folder.
  • Clean up regularly rather than once every few years.

Designers and asset libraries

Design teams accumulate exports for every platform and every revision. Grouping by visual similarity shows at a glance which campaign assets exist in which versions. Keep the final master file plus the platform sizes you actually use, and archive the rest. A tidy library makes it far easier for colleagues to find the right asset first time.

Photographers and bursts

For burst sequences, choose the sharpest frame as the keeper and look through the rest of the group quickly for a better expression or moment. Deleting the extra frames from each burst often reclaims more space than any other clean-up step.

How much can you save?

Libraries that have never been cleaned often contain 10 to 30 percent duplicates. On large photo collections that can mean many gigabytes, and cheaper, faster backups.

Combining fast perceptual hashing with AI similarity finds both exact copies and near versions. With a careful review and a backup, a tidy library is only an afternoon away.

Completely freeNo cost, no sign-up
Files stay privateEverything runs in your browser
Easy in your languageAvailable in many languages