Perceptual hashing
Perceptual hashing creates a compact fingerprint of an image, video or audio file that stays similar when the file is resized, compressed or lightly edited, so platforms can recognise copies of content they already know about.
A normal cryptographic hash, the kind used to check downloads, changes completely if a single pixel changes. That makes it useless for finding copies of an image that has been resized, cropped slightly or saved in a different format. A perceptual hash is designed the other way round: similar-looking inputs produce similar hashes. To check a new upload, a platform computes its hash and compares it with a list of hashes of known content. If the two are close enough, it is treated as a match.
The best-known system is PhotoDNA, developed in 2009 by Microsoft with Hany Farid of Dartmouth College to fight child sexual abuse material. It compares hashes of uploads against a database of hashes of images already identified as illegal. Microsoft says the hash cannot be reversed to recreate the image and that PhotoDNA is not facial recognition. It donated the technology to the US National Center for Missing & Exploited Children and offers it free to qualified companies and organisations, including as a cloud service since 2015.
The same idea protects victims of intimate image abuse. StopNCII.org lets a person create hashes of their own intimate images on their own device; only the hash is uploaded, never the picture. Participating platforms check uploads against those hashes and can remove matches. It works only on the platforms that take part.
Hashing has known limits. It only finds content that someone has already seen and hashed, so new material, including newly generated AI images, slips through until it is added. It can also be fooled. In August 2021 Apple announced NeuralHash, an on-device system to detect known child abuse images, then paused it after a privacy backlash and cancelled it in December 2022. Researchers soon showed that deep perceptual hashes like NeuralHash could be forced into false matches, or evaded, with changes too small for people to notice.
In practice, perceptual hashing is the workhorse of large-scale content matching, and it comes up alongside watermarking in debates about provenance. The two are complementary: a watermark is added when content is created and needs the creator's cooperation, while a hash is computed afterwards from the content itself but needs a reference copy to compare against.
A cryptographic hash changes completely when any part of a file changes, which is what you want for security checks. A perceptual hash changes only slightly when an image is resized, compressed or lightly edited, which is what you want for finding copies of the same picture. PhotoDNA is Microsoft's image hashing technology, developed in 2009 with Dartmouth College to detect known child sexual abuse images. Platforms compare hashes of uploads against a database of hashes of previously identified illegal images. Microsoft provides it free to qualified organisations. Not as such. Hashing can only recognise a specific image that has already been hashed and added to a list. It cannot judge whether a new image was made by AI; that needs watermarks, provenance metadata or detection models. Apple announced NeuralHash in August 2021 to scan photos for known abuse images on users' devices. After a privacy backlash, it paused the plan in September 2021 and cancelled it in December 2022. Researchers also showed that the hash could be manipulated to create false matches.Common questions
What is the difference between a perceptual hash and a cryptographic hash?
What is PhotoDNA?
Can perceptual hashing detect AI-generated images?
Why did Apple drop NeuralHash?
Search for "perceptual hashing", "PhotoDNA" or "hash matching content moderation" to understand how platforms match known content. Reliable sources include documentation from the organisations that run hash databases, such as Microsoft and StopNCII, peer-reviewed security research on hash collisions and evasion, and regulators' guidance on online safety. Treat claims that hashing can catch all harmful content with care, since it only finds material already identified.Finding more
Working out what this means for your business?
Aileron Shift builds the systems behind this site: AI newsrooms that research, write and publish on their own, marketing automation and WordPress hosting for companies that need to move faster than their competitors.