Reverse Image & Video Search — BlockHash

Upload a reference file and select a folder to search for similar images and videos using BlockHash matching.

Step 1 — Select Reference File

Choose a single image or video file to use as reference

Step 2 — Select Folder to Search

Select a folder containing images/videos to search.

Ready
0 items

🟦 How BlockHash Reverse Image Search Works — Complete Guide

Upload one reference image or video and Sakarto scans a folder to find everything that looks similar to it using Block Hash (BlockHash). The reference card is always pinned first — protected from move or delete — and matches appear live as the scan runs.

100% Private — Your Files Never Leave Your Computer All hashing runs locally in your browser. No uploads, no accounts, no tracking. Close the tab and all data is gone.

🔁 What Is Reverse Image Search?

Reverse Image Search lets you ask “find me all copies and similar versions of this specific file.” Instead of scanning a folder and grouping everything that looks alike, you choose one image or video as your reference, then Sakarto scans a folder to find every file whose BlockHash fingerprint is close enough to match it.

This is particularly useful for noisy or heavily compressed collections — BlockHash's block‑level averaging smooths out compression artifacts, making it easier to find re‑encoded or quality‑reduced versions of your reference without false negatives. The reference card is always pinned at position 0 with a blue REFERENCE badge and cannot be moved or deleted.

Noise‑Tolerant Matching

Block‑level averaging absorbs JPEG artifacts and sensor noise, making it easier to find heavily re‑encoded versions of your reference.

Scan Any Folder

Select a folder and Sakarto hashes every image and video in it, comparing each against your reference using Hamming distance.

Reference is Protected

The reference card is always pinned first. It cannot be accidentally moved or deleted. Move and Delete only apply to matched files.

Live Results

Matches appear card by card as each file is processed — you don't need to wait for the full scan to finish.

🧠 How the BlockHash Algorithm Works

Both the reference file and every folder file go through the same BlockHash pipeline. The difference from the folder duplicate finder is what gets compared to what: in reverse search, every folder file is compared against the reference only — not against each other.

  1. Process the Reference File Immediately

    When you select your reference image or video, Sakarto processes it right away — before any folder scanning begins. It divides the file into an N×N block grid, computes the average brightness per block, and produces a binary hash. A thumbnail preview appears so you can confirm the correct file was loaded.

  2. Divide Each Folder File into a Block Grid

    For each image in the scanned folder, Sakarto draws it onto a canvas and divides it into equal blocks. In Fast Mode, JPEG files use their embedded EXIF thumbnail instead — faster with near‑identical accuracy, since block averaging absorbs thumbnail quality differences. Videos use 3‑frame averaging.

  3. Average Brightness per Block & Threshold to Binary

    For each block, all pixels are converted to grayscale using the luminance formula, and their average is computed. Each block is then compared to the overall median brightness of all blocks in that image. Brighter than median → 1, darker → 0. This produces one bit per block — the complete BlockHash fingerprint for that file.

  4. Compare Against the Reference Using Hamming Distance

    The folder file's hash is XOR'd against the reference hash. The number of differing bits is the Hamming distance. An aspect ratio pre‑check first discards pairs where proportions differ by more than 10%. If the Hamming distance is at or below the threshold, the file is added to the results as a match.

  5. Reference Pinned First, Matches Rendered Live

    The reference card always appears at position 0 with a blue REFERENCE badge. Each matching file is rendered as a card the moment it is found, without waiting for the full folder to finish scanning. The result count updates live as matches are added.

  6. Re‑Search on Threshold Change

    If you adjust the similarity threshold slider, the search re‑runs against all already‑processed hashes in a background Web Worker — no re‑scanning needed. Results update progressively. The reference card always stays pinned at position 0 regardless of the threshold.

O(n) not O(n²). In the folder duplicate finder, every file must be compared against every other file. In reverse search, each folder file is compared against only the reference — much faster for large folders. All results are already sorted by relevance to your one specific reference file.

🎚️ The Similarity Threshold Slider

The Similarity Threshold slider (0–50) controls the maximum number of hash bits that can differ between a folder file and the reference for that file to be considered a match. Adjusting it re‑filters results instantly using already‑computed hashes — no re‑scan needed.

Low values (0–5) — Very strict

Only near‑identical files match the reference. Use for finding exact copies and directly re‑exported versions. Essentially no false positives at these values.

Medium values (6–20) — Balanced (default: 10)

Catches resized copies, re‑compressed or re‑encoded versions, and similar images with minor edits. Good for most searches. BlockHash's coarseness means the default of 10 often catches more than aHash at the same value.

High values (21–50) — Loose

Includes files with broadly similar block‑brightness structure, even if the content is visibly different. Always preview before acting at these values.

Lower = stricter. The slider measures the maximum number of differing hash bits allowed. A value of 0 means “only identical hashes match.” A value of 10 means “accept up to 10 differing bits out of 256.”

✅ What It Finds — and What It Might Miss

✅ Finds Well
  • Exact copies of the reference at any resolution
  • The same file re‑saved in a different format
  • Heavily compressed or low‑quality JPEG versions
  • Re‑encoded versions with visible compression artifacts
  • Scanned copies with sensor noise or print grain
  • Screenshots of the reference image
  • Minor brightness or contrast adjustments
⚠️ May Struggle With
  • Heavily cropped versions of the reference
  • Rotated or mirrored copies
  • Images with heavy colour filters or dramatic brightness edits
  • Black‑and‑white vs. colour version of the reference
  • Versions with large watermarks or text added
  • Files that only differ in fine pixel‑level detail within blocks
For rotated or heavily cropped versions of your reference, try ORB Reverse Image Search. For colour‑accurate matching, try Color Signature reverse search. For finer detail discrimination, try pHash reverse search.

📋 Step‑by‑Step: How to Use BlockHash Reverse Image Search

Step 1

Select Your Reference File

Click Choose Reference File. Pick any image or video from your computer — it does not need to be inside the folder you're about to scan. Sakarto processes it immediately and shows a thumbnail preview so you can confirm the right file was selected.

Supported formats: JPEG, PNG, GIF, WebP, BMP (images) and MP4, WebM, MOV, MKV (videos). Files over 40 MB are not supported as reference files.

Step 2

Select the Folder to Search

Once your reference is loaded, click Choose Folder to Search. A native folder picker opens (Chrome / Edge), or drag and drop a folder onto the page. The folder can include your reference file — Sakarto automatically skips it during the scan (matched by name, size, and last‑modified date).

Step 3

Start the Search

Click 🔍 Start Search. A progress bar shows how many files have been processed. The reference card appears immediately at position 0 with a blue REFERENCE badge. Matching files appear live as the scan runs.

Image hashing runs in a background Web Worker — you can switch tabs freely. Video processing pauses when the tab is hidden and resumes when you return.
Step 4

Adjust the Threshold if Needed

Use the Similarity Threshold slider above the results to tune sensitivity. Releasing the slider triggers an instant re‑search on already‑computed hashes. Because BlockHash is a coarse descriptor, you may find that a lower threshold than you expect already catches everything useful. Start at 10 and adjust from there.

Step 5

Review the Results

The reference card is pinned at position 0. All matched files follow. Use preview and compare features to verify before acting:

  • Click a match card to select it (blue border)
  • Ctrl+Click the reference + a match, then click ⚖️ Compare to see them side‑by‑side with a similarity percentage
  • Click the 🔍 icon on hover to preview full size
  • Right‑click any card for the context menu (Move/Delete are disabled for the reference card)
Step 6

Act on Matches — Move or Delete

Select match cards you want to act on (the reference cannot be moved or deleted). Use the toolbar with Queue Mode on (recommended):

📋 CopyCopy filename(s) to clipboard
📂 MoveStage for move to a named subfolder
🗑️ DeleteStage for permanent deletion
⚖️ CompareView files side‑by‑side with similarity %
Step 7

How the Reference File is Protected

The reference card at position 0 is protected throughout the session. Move and Delete are silently blocked if you try to include it in a selection. The context menu grays out Move and Delete for the reference card. In the Compare modal, the reference card shows only a Copy button — no Move or Delete. This is permanent and cannot be overridden.

🏛️ Quick Reference — All Controls

All toolbar buttons, checkboxes, and keyboard shortcuts for reverse search
Button / ActionWhat it does
Choose Reference FileSelect the image or video to search for. Shows a preview once loaded.
Choose Folder to SearchSelect the folder to scan. Activates after reference is loaded.
🔍 Start SearchBegin scanning. Reference card appears immediately; matches render live.
🔄 New SearchReload the page and start fresh with a new reference file
📋 Copy (N)Copy selected filenames to clipboard. N = count selected.
📂 Move (N)Move match files or stage in the Move Queue (reference excluded)
🗑️ Delete (N)Delete match files or stage in Delete Queue (reference excluded)
✕ Deselect AllRemove selection from all cards
⚖️ Compare (N)Open compare modal for Ctrl+clicked files. Needs 2+.
🔇 VideosToggle mute/unmute for all video cards
Queue Mode checkboxStage files for review before executing. Recommended on.
Fast Mode checkboxUse EXIF thumbnail for JPEG hashing — much faster.
Similarity Threshold sliderMaximum Hamming distance allowed. Lower = stricter. Re‑searches on release.
Click match cardSelect / deselect (blue border)
Ctrl + Click cardsAdd to compare list (purple border). Works on reference card too.
Click & drag (empty area)Box‑select multiple match cards at once
Right‑click cardContext menu. Move & Delete are disabled on the reference card.
🔍 hover iconOpen full‑size preview. Reference card shows type as “REFERENCE FILE”.
Hover video cardAuto‑play the video clip

⭐ What Users Say

Based on 98 reviews

"I have thousands of old JPEGs from various cameras — different qualities, lots of compression artifacts. BlockHash reverse search found duplicates that aHash missed completely. The block averaging really works."

"I uploaded a noisy reference file and BlockHash still found all its copies. The noise tolerance is remarkable — images that have been re‑encoded 5 times still get grouped correctly."

"BlockHash is my go‑to first pass for messy collections. It catches all the obvious duplicates and handles varying image quality really well. I then use Compare to verify the borderline cases."

"I run a media archiving service and BlockHash is my secret weapon for processing large client collections. The noise tolerance is remarkable — images that have been re‑encoded 5 times still get grouped correctly."

💡 Tips for Best Results

Back Up First

Always back up your files before deleting anything. Deleted files bypass the recycle bin and cannot be recovered.

BlockHash Handles Noisy References Well

If your reference file is itself noisy or compressed, BlockHash is a better choice than pixel‑precise algorithms like dHash, since block averaging absorbs these imperfections.

Start Stricter Than You Think

BlockHash is coarser than most algorithms, so even a threshold of 5–8 may catch everything you need. Start low and raise only if expected matches are missing.

Always Compare Before Acting

Ctrl+Click the reference and a match, then click Compare to see exact similarity %. BlockHash can occasionally match files that are similar in brightness structure but not true duplicates of your reference.

Use Fast Mode for JPEG‑Heavy Folders

Fast Mode reads EXIF thumbnails instead of full images — 5–10× faster. BlockHash's block averaging absorbs thumbnail quality differences, so accuracy is essentially identical.

Getting Too Many False Positives?

Lower the threshold or switch to pHash reverse search for finer discrimination. If you're missing rotated copies, try ORB reverse search instead.

⚠️ Known Limitations

BlockHash is a coarse descriptor — it can produce false positives.

Two images that share an overall block‑brightness layout without being related may match at moderate thresholds. Always use the Compare modal to verify matches before moving or deleting, especially at threshold values above 10.

Color is not compared — only brightness.

BlockHash converts to grayscale before block averaging. A colourful reference and a greyscale version of the same scene may match perfectly. If colour fidelity matters for your reference search, use Color Signature reverse search.

Rotation and mirroring break matching.

A rotated or mirrored version of the reference will have different block positions and produce a very different hash. Use ORB Reverse Image Search for rotation‑tolerant matching.

Reference file does not need to be in the scanned folder.

The reference is loaded independently. If it happens to be inside the scanned folder, Sakarto detects and skips it automatically (matched by filename, file size, and last‑modified date).

No undo for file deletion.

The File System Access API bypasses the OS recycle bin. Use Queue Mode to review before executing. The reference file cannot be deleted regardless.

Move and Delete require Chrome or Edge.

The File System Access API is only available in Chrome 86+ and Edge 86+. Firefox and Safari can run the search and display results but cannot move or delete files.

🔒 Privacy & Security

Zero network activity after page load. All hashing runs locally. Open DevTools → Network tab during a search: zero outbound requests to any server.
No accounts, no cookies, no analytics. The only localStorage data saved is your checkbox preferences. No file names, paths, or hashes are ever saved or transmitted.
Folder access is scoped and session‑only. Permission is granted only for the folder you select, lasts only while the tab is open, and is revocable from browser site settings.
Purely static — no backend. Sakarto is HTML, CSS, and JavaScript. There is no server, no database, and no API endpoint receiving data from you.

❓ Frequently Asked Questions

How is BlockHash reverse search different from aHash reverse search?
Both compare a folder file's hash against the reference using Hamming distance, but they build the hash differently. aHash shrinks to 16×16 individual pixels and compares each to the overall mean — it reads individual pixel values, which are sensitive to compression noise. BlockHash divides the image into 16 equal blocks and computes the average brightness of each block before comparing to the median. By averaging over a 16×16 area instead of a single pixel, compression artifacts, scan noise, and encoding differences largely cancel out and disappear from the hash. BlockHash is the better choice when your reference's copies are heavily re‑compressed JPEG versions, scanned at different DPIs, or saved through different encoders. The trade‑off: it's a coarser descriptor and produces more false positives at loose thresholds than aHash.
Does my reference file need to be inside the folder I'm scanning?
No — select it from anywhere on your computer. If it also exists inside the scanned folder, Sakarto detects and skips it automatically (matched by filename, file size, and last‑modified timestamp). The reference card is always pinned at position 0 and is never treated as a scan result, even if an identical file is found in the folder.
I know a copy of my reference exists in the folder but it isn't appearing. What should I try?
First, raise the threshold slider toward 15–20. Second, check aspect ratios — pairs differing by more than 10% are excluded by the pre‑check before hashing runs. Third, consider whether the copy has been rotated or heavily cropped — BlockHash, like all grid‑based hashes, cannot match geometrically transformed copies. Switch to ORB Reverse Image Search for rotation and perspective‑distorted copies. Fourth, if the copy is a very different resolution (e.g. a tiny social media thumbnail vs a full‑resolution original), the aspect ratio may have changed slightly — check both the pre‑check threshold and the similarity threshold.
I'm seeing too many unrelated images as matches. How do I reduce false positives?
BlockHash is intentionally coarse — it sacrifices precision for noise tolerance. At thresholds above 10, images that merely share a similar broad brightness layout (mostly bright top, dark bottom, etc.) can match your reference even if they look nothing like it. Lower the threshold to 4–7 first. If false positives persist at strict thresholds, switch to a more discriminating algorithm: pHash (frequency‑domain encoding) or Color Signature (also compares colour) will produce far fewer false positives for the same threshold range.
When is BlockHash the best choice for a reference search?
BlockHash is specifically useful when your reference's copies have been degraded in a way that affects individual pixels more than overall block structure — primarily heavy JPEG re‑compression (quality 20–40), re‑scanning on different hardware, screenshots taken at different quality settings, or copies downloaded from platforms that aggressively recompress images. In all these cases, individual pixel values change noticeably due to encoding noise, but the block‑average brightness across the 16 regions stays very stable. BlockHash will find copies that aHash misses purely because of compression artifacts.
How do I decide which file to keep when I find a match?
Ctrl+Click the reference and a match card, then click Compare. The modal shows both files side by side with dimensions, file size, format, and a similarity percentage. Generally: keep the larger file size (more bytes = less compression = better quality). If one is lossless and the other compressed, keep the lossless version. Check dimensions too — a 4K original is worth keeping over a 1080p re‑export even if the file sizes are similar.
Can I recover files after deleting them?
No. Sakarto's remove() call via the File System Access API permanently deletes files without going through the OS Recycle Bin or Trash. The reference file is fully protected and cannot be deleted regardless. For matched files, use Queue Mode: stage them, preview each one, and only execute when certain. Using Move to a “Sakarto‑Duplicates” subfolder first is a safer alternative to deleting outright.
Does this work on Firefox or Safari?
Reference processing, folder scanning, result display, and the Compare modal all work in Firefox and Safari. Move and Delete require the File System Access API (Chrome 86+ and Edge 86+ only). In other browsers, complete the search, review results, and use Download List to export a report for manual file management.