Free & open source No login · No subscription · Runs on your computer
View on GitHub →
Home / Tools / Duplicate Finder
Tool 07 of 07

Find duplicate documents in a folder.

Scans a folder for exact duplicates using file hashing (free, no AI required) and optionally uses Claude AI to catch near-duplicates like drafts and re-saves. Outputs an Excel report with exact matches in red and near-matches in yellow.

What it does

Duplicate Finder scans a folder and identifies documents you have more than once. It works in two modes:

Mode 1 — Exact duplicates (free). Uses file hashing to find byte-for-byte identical files, even when the filenames differ. No API key needed, no cost, works on any file type.

Mode 2 — Exact + near-duplicates (AI). Adds Claude AI to catch documents that are almost the same — the signed version versus the draft, the letter with a changed date, the memo saved twice with small edits. Requires an Anthropic API key.

Either way, you get an Excel report where duplicate groups are highlighted — red for exact duplicates, yellow for near-duplicates — so you can decide what to cull from the review set.

Nothing is deleted. The tool only reports — it never removes or modifies a file. You review the Excel report and make the culling decisions yourself.

Setup

  1. Install Python 3 (once)

    Download it free from python.org/downloads and run the installer. On Windows, check the box that says "Add Python to PATH" during installation.

  2. Install the libraries for the mode you'll use

    For exact duplicates only (free), one library is enough:

    Mac
    /usr/local/bin/pip3 install openpyxl
    Windows
    pip install openpyxl

    For AI near-duplicate mode, install all three:

    Mac
    /usr/local/bin/pip3 install anthropic pypdf openpyxl
    Windows
    pip install anthropic pypdf openpyxl
  3. Download the script

    Use the download button in the sidebar. Save duplicate_finder.py anywhere convenient.

Running the tool

  1. Start the script

    In Terminal or Command Prompt, navigate to the folder holding the script (type cd, a space, then drag the folder into the window and press Enter). Then run:

    Mac
    python3 duplicate_finder.py
    Windows
    python duplicate_finder.py
  2. Choose your mode

    Mode 1  ← exact duplicates only — free, no API key
    Mode 2  ← exact + AI near-duplicates — needs an API key

    If you pick Mode 2, the script asks for your Anthropic API key (from console.anthropic.com). It's used for this run only and never stored.

  3. Point it at the folder

    Drag the folder you want scanned into the window to paste its path, and press Enter. The script hashes every file, and in Mode 2 also compares document contents for near-matches.

  4. Review the Excel report

    Duplicate groups are highlighted — red rows are exact copies, yellow rows are near-duplicates worth a side-by-side look. Decide what stays in the set.

Common errors

ErrorFix
command not found: python3Python isn't installed (or isn't on your PATH). Install it from python.org — on Windows, re-run the installer and check "Add Python to PATH."
No module named 'openpyxl'The library didn't install. Re-run the install command from Setup step 2. On a Mac, use the full /usr/local/bin/pip3 path shown above.
No module named 'anthropic'You chose Mode 2 but only installed the basic library. Run the AI-mode install command from Setup step 2.
authentication_error / 401The API key was mistyped or has been revoked. Copy a fresh key from console.anthropic.com and paste it carefully.
Scan is very slowHashing thousands of large files takes time, and Mode 2 adds an AI comparison per document. For big review sets, run Mode 1 first to clear exact copies, then Mode 2 on what remains.

More tools in the kit