Reverse Image & Video Search — wHash

Upload a reference file and select a folder to search for similar images and videos using wHash (Wavelet 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 wHash Reverse Image Search Works — Complete Guide

Upload one reference image or video and Sakarto scans a folder to find everything perceptually similar to it using a multi-level Haar Wavelet Hash (wHash). The reference page uses a larger 64×64 canvas with a full multi-level wavelet decomposition for higher accuracy. The reference card is always pinned first and protected from move or delete.

100% Private — Your Files Never Leave Your Computer All wavelet computation and matching 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 say “find me all copies and similar versions of this specific file.” You choose one image or video as your reference, then Sakarto scans a folder and compares every file against it using a multi-level Haar Wavelet fingerprint. The reference card is always pinned at position 0 with a blue REFERENCE badge and cannot be moved or deleted.

The reference search variant of wHash uses a larger 64×64 canvas with a full multi-level wavelet decomposition — more levels of averaging than the 16×16 duplicate finder. This gives a richer low-frequency representation while still being fast and tolerant of re-compression, rescaling, and mild edits. Results appear live as each file is processed, so you don't need to wait for the whole folder to finish.

Multi-Level Wavelet Matching

Uses a full multi-level Haar transform on a 64×64 canvas. More wavelet levels means a richer low-frequency fingerprint and better precision for reference matching.

Scan Any Folder

Select a folder and Sakarto computes a wHash for every image and video in it, comparing each against your reference using Hamming distance on the 64-bit hash.

Reference is Protected

The reference card is always pinned first. It cannot be moved or deleted. All file operations apply only to matched results.

Live Results

Matches appear card by card as each file is processed. No need to wait for the full folder to finish before you start reviewing.

🧠 How the wHash Algorithm Works (Reference Variant)

The reference search uses a multi-level Haar Wavelet Transform on a 64×64 canvas — a more thorough decomposition than the 16×16 single-level transform used in the folder duplicate finder. Both produce a 64-bit hash from the top-left 8×8 LL sub-band, but the 64×64 multi-level approach passes through more rounds of averaging, giving a more refined low-frequency representation.

  1. Process the Reference File Immediately

    When you select your reference image or video, Sakarto immediately computes its wHash: resize to 64×64, convert to grayscale, apply multi-level Haar transform, extract the top-left 8×8 LL sub-band, threshold against the median to produce a 64-bit hash. A thumbnail preview appears so you can confirm the correct file was loaded.

  2. Resize Each Folder File to 64×64

    For each image in the scanned folder, Sakarto draws it onto a 64×64 canvas. The canvas size is a power of 2, required for the Haar transform to work correctly. In Fast Mode, JPEG files use their embedded EXIF thumbnail at this step. Videos use 3-frame majority-vote averaging.

  3. Convert to Grayscale

    Each pixel is converted to a grayscale value using 0.299×R + 0.587×G + 0.114×B. The result is a 64×64 matrix of luminance values. Colour is discarded at this step.

  4. Apply Multi-Level Haar Wavelet Transform

    A full multi-level Haar Wavelet Transform is applied in-place: rows are processed first (averages to the left half, differences to the right), then columns (averages to the top half, differences to the bottom). This is repeated across multiple passes, each halving the resolution of the low-frequency region. After all passes, the top-left 8×8 corner of the 64×64 matrix contains the LL sub-band — the lowest-frequency approximation of the entire image, derived from many levels of wavelet decomposition.

  5. Extract the 8×8 LL Sub-Band → Compute Median → 64-Bit Hash

    The top-left 8×8 = 64 wavelet coefficients are extracted. The median of these 64 values is computed. Each coefficient is then compared to the median: 1 if above, 0 otherwise. The resulting 64-bit binary string is the wHash fingerprint for this file.

  6. Compare Against the Reference Using Hamming Distance

    The folder file's 64-bit 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 results as a match.

  7. 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. The result count and header update live during the scan.

  8. Re-Search on Threshold Change

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

Why 64×64 here vs 16×16 in the duplicate finder? In the reference search you are comparing everything against one specific image, not every image against every other. The extra accuracy of the larger canvas and multi-level decomposition is worthwhile for reference matching, and the O(n) cost (one comparison per folder file) means the larger canvas doesn't slow things down significantly even for large folders.
O(n), not O(n²). In the folder duplicate finder, every file is compared against every other. In reverse search, each folder file is compared only against the single reference — much faster for large folders, with results pre-sorted by relevance to your 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 appear in results. Adjusting it re-filters results instantly against already-computed hashes — no re-scan needed.

Low values (0–5) — Very strict

Only near-identical perceptual structures match the reference. Finds exact copies and directly exported versions with very few false positives.

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

Catches resized copies, re-compressed versions, and mild colour corrections. The default of 10 is a good starting point for most reference searches.

High values (21–50) — Loose

Includes files with broadly similar perceptual structure to the reference. 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 wavelet fingerprints match.” A value of 10 means “accept up to 10 bit differences out of 64.”

✅ 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
  • Re-compressed JPEG versions of the reference
  • Copies with mild colour grading or brightness changes
  • Versions with slight sharpening or noise reduction
  • Lightly cropped versions preserving major structural content
  • Screenshots of the reference image
⚠️ May Struggle With
  • Rotated or mirrored copies of the reference
  • Heavily cropped versions where major structures are removed
  • Dramatic colour transformations that remap overall luminance
  • Stylised versions (extreme filter effects, posterise)
  • Very heavy JPEG compression at quality 1–5
For rotated or perspective-distorted copies of your reference, use ORB Reverse Image Search. For copies differing mainly in brightness or exposure, dHash Reverse Image Search is more sensitive to those changes. For the most discriminating frequency-domain matching, try pHash Reverse Image Search.

📋 Step‑by‑Step: How to Use wHash 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 immediately computes its wHash fingerprint 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 hash is ready, click Choose Folder to Search. A native folder picker opens (Chrome / Edge), or drag and drop a folder onto the page. If your reference file is inside the scanned folder, Sakarto automatically skips it (matched by filename, 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 the main thread for the reference search (no Web Worker offloading needed since it's O(n)). 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 to tune sensitivity. Releasing the slider triggers an instant re-search on already-computed hashes — no re-scan needed. The default of 10 is a good starting point for wHash's multi-level 64×64 variant. If you expect heavily compressed or colour-shifted copies, try raising it slightly toward 15–18.

Step 5

Review the Results

The reference card is pinned at position 0. All matched files follow. Use preview and compare 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 and use the toolbar with Queue Mode on (recommended). The reference cannot be moved or deleted.

📋 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 include the reference 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. This cannot be overridden.

🏛️ Quick Reference — All Controls

All toolbar buttons, checkboxes, and keyboard shortcuts for wHash reverse search
Button / ActionWhat it does
Choose Reference FileSelect the image or video to search for. wHash is computed immediately on selection.
Choose Folder to SearchSelect the folder to scan. Activates after reference hash is ready.
🔍 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
📂 Move (N)Move match files or stage in 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 thumbnails for JPEG hashing — faster with no meaningful accuracy loss.
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 “REFERENCE FILE” label.
Hover video cardAuto‑play the video clip

⭐ What Users Say

Based on 97 reviews

"wHash reverse search found copies that pHash missed because of local edits. The wavelet transform handles watermarked and lightly edited versions really well. I use it as my second pass after aHash."

"I had a single photo and needed to find all versions across my backup drives. wHash found them all — resized, re‑compressed, even some with slight colour corrections. The speed is excellent and the results are accurate."

"The 64×64 wavelet transform gives noticeably better accuracy than the 16×16 version in the duplicate finder. I compared it against pHash on 500 images and the results were nearly identical, but wHash was faster."

"I run a media archive and wHash is my go‑to for finding copies of specific images. The live results and reference protection make it perfect for large drives — I can start reviewing matches 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.

Choose a High-Quality Reference

Where possible, use an unedited or high-quality version of the file as your reference. A reference that is itself heavily compressed may produce a less distinctive wavelet fingerprint.

Fast Mode for JPEG Folders

Fast Mode reads EXIF thumbnails instead of full images — 5–10× faster. The multi-level Haar transform discards all high-frequency detail anyway, so thumbnail quality differences have no meaningful effect on the resulting hash.

Compare Before Deciding

Ctrl+Click the reference and a match, then click Compare to see exact dimensions, file size, and similarity %. Verify visually before moving or deleting anything.

Move, Don't Delete

Move matches to a “Sakarto‑Duplicates” subfolder rather than deleting outright. Review for a few days before permanently removing anything.

Not Finding an Expected Match?

Raise the threshold slightly. If the copy was rotated, switch to ORB Reverse Image Search. If the copy differs mainly in brightness, try dHash Reverse Image Search. For the most precise frequency-domain matching, try pHash Reverse Image Search.

⚠️ Known Limitations

Rotation and mirroring break matching.

A rotated version of the reference changes the spatial arrangement of wavelet coefficients. A mirrored copy reverses the coefficient layout. For rotation-tolerant matching, use ORB Reverse Image Search.

Colour is not compared — only luminance structure.

wHash converts to grayscale before the wavelet transform. A colour version and a desaturated version of the same reference will match perfectly if their luminance structures are similar. If colour accuracy is important, use Color Signature reverse search.

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

The reference is loaded independently from anywhere on your computer. If it happens to be inside the scanned folder, Sakarto detects and skips it automatically — matched by filename, file size, and last-modified timestamp.

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 available only 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 wavelet computation and matching 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 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

Why does wHash reverse search use a 64×64 canvas when the duplicate finder uses 16×16?
In the duplicate finder, every file must be compared against every other file (O(n²) comparisons). Keeping the canvas at 16×16 makes each hash extremely fast so the total scan time stays manageable. In reverse search, every folder file is compared against only your one reference (O(n) comparisons) — one pass through the folder is all that's needed. The lower comparison count makes it affordable to use a 64×64 canvas and a multi‑level Haar wavelet decomposition, which extracts a richer fingerprint. The result is better matching accuracy for your specific reference, particularly for files that have been moderately edited or have regional changes in one area of the image.
Why use wHash reverse search instead of pHash or dHash?
All three are solid choices for different reasons. wHash applies a Haar Wavelet Transform and encodes the low‑frequency LL sub‑band — capturing the multi‑scale structural overview of the image. It's typically faster than pHash (wavelet computation is cheaper than 2D DCT on a 32×32 canvas) and produces comparable quality for most photo duplicates. Choose pHash if you need maximum precision for subtly edited copies — its DCT encoding is more discriminating at the boundary between matching and non‑matching. Choose dHash specifically for copies with significant brightness or exposure adjustments. Choose wHash as a general‑purpose first choice that handles the majority of copy types (re‑compression, format conversion, mild edits) at very good speed.
Does my reference file need to be inside the folder I'm scanning?
No — select it from anywhere on your computer. Sakarto automatically skips it if it exists inside the scanned folder, matched by filename, file size, and last‑modified timestamp. The reference card is always pinned at position 0 and is protected from deletion regardless of what's in the scanned folder.
A copy of my reference isn't appearing. What should I try?
First, raise the threshold toward 15–18. Second, check aspect ratios — pairs differing by more than 10% are excluded before hashing runs. Third, consider the type of edit: wHash handles re‑compression, format changes, mild colour edits, and watermarks well. Like all hash algorithms, it cannot match rotated images — use ORB Reverse Image Search for rotation, mirroring, or perspective distortion. For very extreme brightness changes, dHash may perform better since it specifically encodes gradient direction rather than absolute values. Fourth, confirm the copy is in a supported format and under 40 MB.
Does wHash handle locally edited copies better than pHash?
Slightly, yes — and this is one of the meaningful differences between the two. Haar wavelets decompose the image at multiple spatial scales simultaneously, so the LL sub‑band captures structure at different levels of detail. If a copy of your reference has been locally edited in one region (a watermark added, an object cloned out, a face blurred), the wavelet sub‑band reflects the unchanged regions more robustly than a global DCT because the multi‑scale decomposition distributes the unchanged structural information across multiple wavelet coefficients. pHash's DCT is more sensitive to concentrated changes in specific frequency ranges. In practice the difference is small, but wHash is the marginally better choice for copies with local rather than global modifications.
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 exact dimensions, file size, format, and a similarity percentage. Keep the largest file size (more data = better quality at the same resolution), or the highest resolution if sizes are similar. If one is lossless (PNG) and the other compressed (JPEG), the lossless version is generally worth keeping. For version‑controlled edits (e.g. a retouched version vs. the original), check both the similarity score and the image content carefully before deciding which is the “better” copy.
Why does video scanning pause when I switch tabs?
Browsers throttle video element processing when a tab is hidden, stopping frame extraction. Sakarto detects this via the Page Visibility API and pauses video scanning, resuming when you return. Image hashing runs in a background Web Worker that is not subject to tab‑visibility throttling — images continue scanning at full speed in the background.
Can I recover files after deleting them?
No. The File System Access API's remove() method permanently deletes files without using the OS Recycle Bin or Trash. The reference file is always protected. For all matched files, use Queue Mode: stage them, preview each one with the full‑size icon, compare against the reference in the Compare modal, and execute only when certain.
Does this work on Firefox or Safari?
Reference processing, folder scanning, wavelet computation, 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 and use Download List to export a report for manual file management.