Glossary · Published · Updated

Hash matching

Comparing a file's fingerprint, its hash, with lists of hashes of known illegal material, to find copies and near copies of it.

Hash matching turns an image or video into a short fingerprint and compares it with lists of fingerprints of known illegal material, such as child sexual abuse material (CSAM). A match points to a copy, or a near copy, of something already identified. It cannot judge new content, which is what classifiers do, so platforms often need both. Detectivision does not offer hash matching.

How it works

A hash function turns a file into a short value, its hash. Two kinds matter here:

  • Cryptographic hashes, such as MD5, SHA-1 and SHA-256, change completely when one byte changes, so they match only exact copies.
  • Perceptual hashes, such as PhotoDNA and PDQ, are computed from what the image looks like, so a resized or re-saved copy gets a nearby hash. Two hashes match when the distance between them is under a chosen threshold.

Microsoft says PhotoDNA "creates a unique digital signature (known as a 'hash') of an image which is then compared against signatures (hashes) of other photos to find copies of the same image". It "is not facial recognition software", and its hash "is not reversible". Meta's PDQ, open source under a BSD licence since 2019, is "a perceptual hasher: it tries to match images which people perceive as similar". Its README suggests starting with a match distance of 31 or less, then testing thresholds on your own data.

How much change a match survives differs by algorithm. The IWF says its PhotoDNA hashes still match an image that was "resized, cropped or colours changed". Meta's documentation says PDQ does well with JPEG-to-PNG conversion and lower JPEG quality, but not when one photo is a crop of another.

On an upload, the flow is:

  1. Compute the file's hashes.
  2. Look them up in the lists you have access to: an exact lookup for cryptographic hashes, a nearest-match search within your distance for perceptual ones.
  3. On a match, block the upload, and preserve and report it as the law that applies to you requires.
  4. With no match, the file goes on to your other checks, such as classifiers and user reports. A miss says nothing about whether new material is harmful.

Who keeps the lists, and who can use them

Hash lists and tools, from each provider's own pagesAs read on 16 October 2026
ProviderWhat it offersWho can use it
NCMEC, the US National Center for Missing & Exploited ChildrenA list of hashes of images it confirms as CSAM "after a triple-review process", shared with electronic service providersTech companies, "on a voluntary basis"
IWF, the UK's Internet Watch FoundationThe IWF Hash List, "updated daily and manually verified", with PhotoDNA, MD5, SHA-1 and SHA-256 hashes"IWF Members", under licence
Microsoft PhotoDNAImage hashing that finds copies of the same image, and the PhotoDNA Cloud ServiceThe Cloud Service is "free for qualified customers"; PhotoDNA is free to law enforcement and tool providers
Meta PDQOpen-source perceptual image hashingAnyone; it is an algorithm, not a list
Thorn's SaferMatching against hashes of verified CSAM, with cryptographic and perceptual hashing, plus classifiers for new materialCompanies, under a commercial agreement
Tech Coalition's LanternSignal sharing between companies, including hashes of known CSAMQualifying tech companies, and financial institutions on a receive-only basis

Thorn adds that companies "must adhere to their national reporting mandates", and that it "does not report on a company's behalf".

Hashes and classifiers

Hash matchingA classifier
FindsCopies and near copies of files already identifiedCategories in content it has never seen
Cannot findAnything newCategories it was not built for
MistakesA near match can be a different image, so the distance threshold mattersFalse positives and false negatives in every category
AnswerMatch or no match, against a listA score per category
AccessLists restricted to qualifying organisationsCommercial APIs and open models

Specialist providers pair the two. Safer offers hash matching for known CSAM and a classifier that "identifies potentially novel image and video CSAM". General moderation APIs are a different tool. Microsoft says of its own: "You cannot use Content Moderator to detect illegal child exploitation images. However, qualified organizations can use the PhotoDNA Cloud Service to screen for this type of content."

Where laws mention it

  • Turkey. Law 5651, Turkey's Internet Law, gains a new paragraph on 1 November 2026: Additional Article 4, paragraph 23 (ek 4/23), added by Law 7578. It applies to social network providers (sosyal ağ sağlayıcı: services that let users create, view or share content such as text, images and sound to interact) with more than 10 million daily accesses from Turkey. They must take every necessary measure so that content covered by a removal or access-blocking decision under Law 5651 is not published on their site. The law names no method; hash matching against the removed files is one way platforms find re-uploads.
  • UAE. Federal Decree-Law No. 26 of 2025 on Child Digital Safety, in force since 1 January 2026, applies to digital platforms that operate in the UAE or target users there. In Latham & Watkins' summary, "Immediate reporting of child pornography or harmful content involving children to concerned entities is mandatory", and "AI systems for proactive detection and removal" are required. The summary does not mention hash matching.
  • UK. Under the Online Safety Act 2023, Ofcom, the online safety regulator, writes codes of practice. The government's explanatory memorandum of 17 December 2024 says the illegal content codes include "measures on automated tools to detect CSAM". A memorandum of 18 June 2026 refers to amendments laid on 1 June 2026 "relating to hash-matching for non-consensual intimate images". Ofcom's codes set out which services each measure covers.

What Detectivision does and does not do

Detectivision's image flags are hate, scam, sexual and violence, and each judges the whole image. It does not:

  • match hashes or hold any hash list;
  • detect CSAM: a sexual flag says an image is sexual, not anything about anyone's age;
  • estimate age (age assurance);
  • report to NCMEC, the IWF or any authority;
  • stop removed files from being uploaded again.

If your platform needs hash matching, go to the providers above; their access rules apply. To classify new images for sexual content and violence, which is a different job from finding CSAM, see NSFW detection, or talk to us.

Questions

Frequently asked

What is the difference between a cryptographic and a perceptual hash?

A cryptographic hash, such as SHA-256, changes completely when one byte of the file changes, so it matches only exact copies. A perceptual hash, such as PhotoDNA or PDQ, is computed from what the image looks like, so a resized or re-saved copy gets a hash close to the original's, and a match means the distance between two hashes is small enough.

Can hash matching find new CSAM?

No. A hash list holds only material that has already been found and confirmed, so a match points to a copy of something known. New material needs a classifier and trained people. Specialist providers offer both: Thorn's Safer, for example, pairs hash matching with a classifier for material not seen before.

Who can get access to CSAM hash lists?

Access is restricted, and each provider sets its own terms. NCMEC shares its list with electronic service providers, which use it on a voluntary basis. IWF Members use the IWF Hash List under licence. Microsoft's PhotoDNA Cloud Service is free for qualified customers. Check the provider's own criteria before you plan around a list.

Can a hash be turned back into the image?

Microsoft says no for PhotoDNA: its hash "is not reversible, and therefore cannot be used to recreate an image". A cryptographic hash such as SHA-256 is designed to be one-way. That is why providers can share lists of hashes of illegal images instead of the images themselves.

Does Detectivision detect CSAM?

No. Detectivision does not offer hash matching, CSAM detection or age estimation, and it does not report to NCMEC, the IWF or any authority. Its image flags are hate, scam, sexual and violence, and a sexual flag says nothing about the age of anyone in an image.

Related articles
  • Detect nudity and sexual content in images, and sexual language in text written in ten languages, with one API call and a confidence for each finding.

  • Age verification checks how old a user is; moderation checks what they post. The terms, the methods UAE, UK, EU and Turkish rules accept, and who does what.

  • A content moderation API checks the text or images you send and says what it found and how sure it is. How requests, results, prices and decisions work.

  • From 1 November 2026, social networks reachable from Turkey may not serve under-15s and must verify ages. Scope, deadlines and every duty, with article numbers.

  • The UAE Child Digital Safety Law covers platforms operating in or aimed at the UAE. Who is in scope, each duty, the expected 2027 deadline and what is pending.

Sources
  1. PhotoDNA, Microsoft, read on 16 October 2026
  2. PDQ reference implementation (README, facebook/ThreatExchange, BSD licence), Meta, read on 16 October 2026
  3. The TMK+PDQF video-hashing algorithm and the PDQ image-hashing algorithm (hashing.pdf, facebook/ThreatExchange), Meta, read on 16 October 2026
  4. Open-Sourcing Photo- and Video-Matching Technology to Make the Internet Safer (1 August 2019), Meta, read on 16 October 2026
  5. Helping Child Survivors: The Fight to Remove Sex Abuse Images (15 April 2024), National Center for Missing & Exploited Children, read on 16 October 2026
  6. Image Hash List, Internet Watch Foundation, read on 16 October 2026
  7. Safer solutions (CSAM and CSE detection), Thorn, read on 16 October 2026
  8. Safer Partnership Criteria, Thorn, read on 16 October 2026
  9. Lantern, Tech Coalition, read on 16 October 2026
  10. What is Azure Content Moderator? (updated 5 June 2026), Microsoft Learn, read on 16 October 2026
  11. Law No. 5651, consolidated text (Article 2(1)(s), definition of a social network provider), Mevzuat Bilgi Sistemi, read on 16 October 2026
  12. Law No. 7578, Article 22, adding paragraph 23 to Additional Article 4 of Law 5651 (Resmî Gazete 33240, 1 May 2026), Resmî Gazete, read on 16 October 2026
  13. UAE's Child Digital Safety Law: What Every Digital Platform and ISP Should Know (law-firm summary, 9 January 2026), Latham & Watkins, read on 16 October 2026
  14. Online Safety Act: Illegal Content Codes of Practice 2024, explanatory memorandum (17 December 2024), GOV.UK, read on 16 October 2026
  15. Explanatory memorandum: draft amendments (No. 2) to the Illegal Content Codes of Practice for user-to-user services (18 June 2026), GOV.UK, read on 16 October 2026
  16. Service status, GET /api/v1/status, Detectivision, read on 16 October 2026