Reverse Image & Video Search — aHash

Upload a reference file and select a folder to search for similar images and videos using aHash (Average Hash) 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 aHash 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 Average Hash (aHash). 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 is the visual equivalent of “find all copies of this specific file.” Instead of scanning a folder and grouping everything that looks alike, you choose one specific image or video as your reference, then Sakarto scans a folder to find everything with a similar fingerprint to it.

Use it when you already know what you're looking for — for example: “find all copies and resized versions of this specific photo in my archive.” The reference card is always pinned at position 0 with a blue REFERENCE badge and cannot be moved or deleted.

One Reference File

Upload a single image or video. Sakarto processes it immediately and shows a preview so you can verify you picked the right file.

Scan Any Folder

Select a folder and Sakarto hashes every image and video in it, then compares 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 the matched files.

Live Results

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

🧠 How the aHash Algorithm Works

Both the reference file and every folder file are processed with the same aHash pipeline. The difference 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 shrinks the file to 16×16, converts to grayscale, and computes its 256-bit aHash. A thumbnail preview appears so you can confirm the correct file was loaded.

  2. Shrink Each Folder File to 16×16

    For each image in the scanned folder, Sakarto draws it onto a 16×16 canvas. In Fast Mode, JPEG files use their embedded EXIF thumbnail instead — much faster, nearly identical accuracy. Videos extract 3 frames and average them. Files over 40 MB are skipped.

  3. Grayscale & Average Hash

    Each 16×16 image is converted to grayscale using luminance weights. The average brightness across all 256 pixels is computed. Each pixel becomes 1 if above average, 0 if below — producing a 256-bit hash that captures the file's fundamental brightness structure.

  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 the proportions differ by more than 10%. If the Hamming distance is at or below the threshold set by the slider, the file is added to the results.

  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 immediately when found — you see results appear live without waiting for the full scan. The result count updates as each match is found.

  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 as each card is re-evaluated. The reference card always stays pinned at position 0.

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

🎚️ The Similarity Threshold Slider

The Similarity Threshold slider (0–50) controls how many bits two hashes can differ and still be considered a match for your reference. Adjusting it after a scan re-filters results instantly using already-computed hashes — no re-scan needed.

Low values (0–5) — Very strict

Only near-identical files match. Use for finding exact copies, the same file at different quality settings, or lossless vs. lossy exports of your reference. Very few or no false positives.

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

Catches resized copies, re-compressed versions, and similar images with minor adjustments. A good starting point for most searches. Some false positives are possible.

High values (21–50) — Loose

Includes images with broadly similar brightness structure, even if the content is noticeably different. Useful for finding visually related files. Expect more false positives — always preview before acting.

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

✅ What It Finds — and What It Might Miss

✅ Finds Well
  • Exact copies of the reference at any resolution
  • The same image re-saved in a different format
  • Re-compressed or lower-quality JPEG versions
  • Screenshots of the reference image
  • Minor brightness or contrast adjustments
  • Videos with similar key frames to the reference
⚠️ May Struggle With
  • Heavily cropped versions of the reference
  • Rotated or mirrored copies
  • Images with heavy colour filters or dramatic edits
  • Black-and-white vs. colour version of the reference
  • Versions with large watermarks or text added
  • Night vs. day versions of the same scene
For rotated, perspective-warped, or heavily cropped versions of your reference, try ORB Reverse Image Search — it matches local keypoints and handles geometric transformations. For colour-graded copies, try dHash or Color Signature reverse search.

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

Step 1

Select Your Reference File

Click Choose Reference File. Select 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 correct 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 directly onto the page. The folder can contain your reference file — Sakarto automatically skips it if it appears in 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 are added 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 matching sensitivity. Releasing the slider triggers an instant re-search using already-computed hashes. If expected matches are missing, raise the threshold. If too many unrelated files appear, lower it.

Step 5

Review the Results

Results show the reference card at position 0, followed by all matched files. Use the preview and compare features to verify matches before acting:

  • Click a match card to select it (blue border)
  • Ctrl+Click the reference + a match card, 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 on the reference card)
Step 6

Act on Matches — Move or Delete

Select the 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 has special protection built in. Move and Delete are silently blocked for it, even if you select it along with other files. 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.

🏛️ 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 them 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 118 reviews

"aHash reverse search scanned my 15,000‑photo archive in under 2 minutes. I uploaded one photo and found every copy — different resolutions, formats, everything. The speed is incredible."

"I had a specific image and needed to find all versions across my backup drives. aHash found them all — resized, re‑compressed, even some that had been rotated 180° (though rotation is its weakness). The reference protection saved me from accidentally deleting the original."

"For finding copies of a specific file, aHash is unbeatable for speed. I use it as my first pass on every folder. The threshold slider lets me fine‑tune the results — start strict and loosen if needed."

"I had a logo image and needed to find all variations across thousands of documents. aHash found them all in seconds. The live results view is perfect for large folders — I can start reviewing before the scan finishes."

💡 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.

Use the Best Quality Reference

Choose the highest-resolution, uncompressed version of the file as your reference. A heavily compressed JPEG reference may produce a slightly different hash than lossless versions in the folder.

Start Strict, Then Loosen

Begin with the default threshold of 10. If expected copies aren't appearing, raise toward 15–20. If too many unrelated files appear, lower toward 5.

Compare Before Acting

Ctrl+Click the reference card and a match card, then click Compare to see them side‑by‑side with the exact similarity percentage. Don't delete based on the thumbnail alone.

Use Fast Mode for JPEG Folders

Fast Mode reads embedded EXIF thumbnails instead of full images — 5–10× faster for JPEG-heavy folders, with the same matching accuracy in most cases.

Try a Different Algorithm for Edge Cases

If aHash is finding too many false positives for your reference, try pHash (more accurate for subtle edits) or Color Signature (compares actual colour values, not just brightness).

⚠️ Known Limitations

Color is ignored — brightness structure only.

aHash converts to grayscale before hashing. A black‑and‑white version and a colourful version of your reference may match perfectly. A heavily colour‑graded version may not match at all. Use Color Signature reverse search if colour fidelity matters.

Rotation and mirroring break matching.

A rotated or mirrored version of your reference will have a completely 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, reference files, or hash values 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 at any time.
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

Does my reference file need to be inside the folder I'm scanning?
No — select the reference from anywhere on your computer. If it also lives inside the scanned folder, Sakarto detects and skips it automatically using a combination of filename, file size, and last‑modified timestamp, so it won't appear as a false match to itself. You can safely scan a folder that contains your reference file without any special setup.
Why is the reference card shown before I've even selected a folder?
Sakarto computes the reference hash immediately when you upload the file — before any folder scanning starts. This serves two purposes: you can see and verify the file you selected (and preview it), and the reference hash is fully ready the moment you pick a folder so scanning begins instantly with no delay. All cards that appear after you select a folder are actual matches from the scan — the reference card is always pinned at position 0 as a visual anchor.
Why does aHash reverse search work differently from the aHash duplicate finder?
The hashing algorithm is identical — both resize to 16×16, convert to grayscale, and produce a 256‑bit hash. The difference is in the comparison step. The duplicate finder compares every file against every other file (O(n²)), which is why it can be slow for large folders. Reverse search compares every folder file against only your one reference (O(n)), which is much faster and naturally produces results sorted by similarity to your specific file. Use the duplicate finder when you want to find all clusters of similar files; use reverse search when you already know which file you're looking for copies of.
A copy of my reference isn't appearing. What should I try?
Work through this checklist: first, raise the threshold slider toward 15–20. Second, check that the copy has a similar aspect ratio to your reference — pairs where one file's proportions differ from the other by more than 10% are excluded by the pre‑check before hashing even runs. Third, consider the type of edit: aHash handles re‑compression, resizing, and minor brightness adjustments well, but fails for rotated or heavily cropped copies (the brightness grid shifts entirely). For rotated copies, switch to ORB Reverse Image Search. For exposure‑adjusted copies, try dHash Reverse Image Search which is specifically designed for that case.
I'm getting too many unrelated images in my results. How do I reduce them?
Lower the threshold slider — this requires folder files to have fewer differing bits vs the reference before being shown as a match. aHash is intentionally a coarse descriptor, so at higher thresholds it can match photos that merely share a similar brightness distribution without being actual copies of your reference. Starting at threshold 5–8 and raising from there is a good approach. If false positives persist even at very strict thresholds, switch to pHash Reverse Image Search, which encodes frequency‑domain content and is significantly more discriminating.
How do I decide which file to keep when I find a match?
Ctrl+Click the reference card and a match card, then click Compare. The modal shows both files side by side with exact dimensions, file size, format, and a similarity percentage. As a general rule: keep the largest file size (more bytes = more image data = better quality), or the highest resolution if file sizes are similar. If one is lossless (PNG, TIFF) and the other is compressed (JPEG), the lossless version is usually worth keeping. If both are JEPGs, the one with the higher file size has a higher quality setting. The similarity percentage gives a sense of how close the match is — values above 90% typically mean the images are perceptually near‑identical.
What's the best quality reference file to use for the most accurate results?
Use the highest‑quality, uncompressed version available — a lossless PNG or high‑resolution JPEG at the original quality. A heavily compressed reference (e.g. a thumbnail or a 64k JPEG from a messaging app) will produce a noisier hash, which can cause both missed matches (genuine copies score slightly above threshold) and false positives (unrelated files happen to resemble the degraded hash). If your best available reference is lossy, try raising the threshold slightly to compensate.
Can I recover files after deleting them?
No. The File System Access API's remove() method permanently deletes files without going through the OS Recycle Bin or Trash. The reference file is always protected and cannot be deleted or moved regardless. For all matched files, use Queue Mode: stage them in the Delete Queue, preview each one with the full‑size preview icon, compare them against the reference in the Compare modal, and only execute the deletion when you're certain.
Does this work on Firefox or Safari?
Reference processing, folder scanning, hash computation, result display, and the Compare modal all work in Firefox and Safari. Move and Delete are the exception — they 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, then manage files manually in your OS file manager.