Clean Tools

Fuzzy Duplicate Finder

Group CSV rows whose chosen columns are nearly the same, such as Jon Smith and John Smith, and keep the first row of each group. Runs locally in your browser — nothing is uploaded for processing.

Input

Paste CSV or upload a file

Options

Match on columns

Up to 3,000 rows, every pair is compared. Above that, a row is only compared with rows whose key starts with the same two characters, either as typed or with its words sorted alphabetically, so a typo in the first two letters can be missed. Files over 20,000 rows are refused.

Output Preview

Result

Run the tool to preview output here.

Fuzzy Duplicate Finder

Operator: Abdulla Al Fahad. How tools are built and checked

Fuzzy Duplicate Finder looks for rows that describe the same thing in slightly different words: Jon Smith and John Smith, Acme Ltd and ACME Limited. You choose which columns to compare and how similar two rows must be, and the tool groups the rows that clear that bar. It then either labels each group or keeps only the first row of each.

The threshold accepts values from 0.70 to 1.00 only, because below 0.70 almost any two short names would pair up. An exact de-duplicator only removes rows that match character for character, which misses the typo, missing letter or different capitalisation behind most duplicates in hand-typed lists. This tool scores near matches instead, and after each run lists up to 25 matched pairs, lowest score first, so you can judge whether the threshold is right before removing anything.

Key features

  • Match on one column or a combination of columns
  • Jaro-Winkler or normalised Levenshtein similarity
  • Threshold from 0.70 to 1.00 in steps of 0.01
  • Optional punctuation stripping before comparison
  • Groups built by linking every pair at or above the threshold
  • Review table of up to 25 matched pairs with their scores
  • Every pair compared up to 3,000 rows; blocking up to 20,000 rows

Input is a CSV with a header row. Each row gets a match key built from the columns you tick, joined with a | character. With Strip punctuation on (the default), each value is trimmed, lowercased, apostrophes are removed so O'Brien becomes obrien, other punctuation becomes a space, and runs of spaces collapse to one. With it off, only trimming, lowercasing and space collapsing are applied.

Mark groups keeps every row and appends duplicate_group (a group number, blank for rows with no match) and is_kept (yes or no). Remove duplicates outputs only the kept rows with the original columns. Rows whose match columns are all blank are never grouped.

How it works

After the keys are built, rows are compared in pairs. Any pair whose score is at or above the threshold is linked, and linked rows are merged into groups with a union-find structure, so links carry through chains of rows. The first row of each group in file order is the kept row, and groups are numbered in the order their first row appears. The same input and settings always give the same groups.

Jaro-Winkler counts characters the two keys share within a short distance of each other, penalises swapped characters, and combines these into a Jaro score between 0 and 1. It then adds a Winkler bonus of 0.1 × l × (1 − Jaro), where l is the number of leading characters the keys share, capped at 4. That bonus is why it suits names, where the first letters are usually typed correctly. Normalised Levenshtein is 1 minus the number of single-character inserts, deletions and substitutions needed to turn one key into the other, divided by the length of the longer key.

Before scoring a pair, the tool checks how many characters the two keys have in common at all. If even a perfect arrangement of those characters could not reach the threshold, the pair is skipped. This changes no result; it only avoids work on pairs that are clearly different.

Common use cases

  • Merging two CRM exports where sales reps typed the same contacts with different spellings
  • Cleaning a vendor master file before a payment run, so one supplier is not set up twice
  • Finding repeat registrations in an event list where people signed up again with a typo in their name
  • Reviewing a donor list for the same street address written as High St. and High Street

How to use this tool

  1. Paste the CSV into the input box or select a file with Click to upload.
  2. Tick the columns to match on under Match on columns.
  3. Choose a similarity method and set the threshold. 0.90 is the starting value.
  4. Leave Output on Mark groups for a first pass, then click Find duplicates.
  5. Read the group count and the review table. Raise the threshold if unrelated rows are pairing, lower it if obvious duplicates are missing, and run again.
  6. When the groups look right, switch Output to Remove duplicates, run once more and download the CSV.

Example

Contact list matched on name only, Jaro-Winkler, threshold 0.90 (input)

name,city
Jon Smith,Leeds
John Smith,Leeds
Maria Lopez,Seville
Mario Lopes,Seville
"Smith, Jon",Leeds
Acme Ltd,Leeds
ACME Limited,Leeds

Mark groups mode (output)

name,city,duplicate_group,is_kept
Jon Smith,Leeds,1,yes
John Smith,Leeds,1,no
Maria Lopez,Seville,,yes
Mario Lopes,Seville,,yes
"Smith, Jon",Leeds,,yes
Acme Ltd,Leeds,2,yes
ACME Limited,Leeds,2,no

Tips for best results

  • Start in Mark groups mode and read the review table. It lists matched pairs lowest score first, so the first rows show exactly where the threshold is cutting.
  • Match on more than one column when names are common. Name plus city or name plus postcode stops two different John Smiths in different towns from merging.
  • Pick Jaro-Winkler for short values such as names and company names, and Levenshtein for longer free text such as street addresses, where the edit count matters more than the first few letters.

Common pitfalls

Neither similarity measure understands word order. Smith, Jon and Jon Smith score 0.407 with Jaro-Winkler and will not be grouped at any allowed threshold. Split names into first and last name columns, or put them in the same order, before matching.

Groups chain. If row 1 matches row 2 and row 2 matches row 3, all three land in one group even when rows 1 and 3 are not similar on their own. With a low threshold on short values this can pull unrelated rows together, so check the larger groups by hand.

The tool cannot know that two different people really do have similar names. Maria Lopez and Mario Lopes score 0.894 and may well be two people; at a threshold of 0.85 they would be merged.

Common errors and how to fix them

Choose at least one column to match on.
Every box under Match on columns is unticked. Tick the column, or columns, that identify a record, such as name or name and postcode.
Threshold must be a number from 0.70 to 1.00.
The threshold box is blank or outside the allowed range. Enter a value such as 0.90. Below 0.70 almost any two short names would pair up, so lower values are not accepted.
This file has 24,310 rows. The fuzzy finder handles up to 20,000 rows in the browser; split the file first.
The finder refuses larger files to keep the browser responsive. Split the file, for example by country or by first letter of the surname, and run each part separately.

Best practices

  • Normalise obvious variants before matching. Replacing Limited with Ltd, or Street with St, in a find-and-replace pass makes the scores reflect real differences rather than abbreviation habits.
  • Write down the threshold and method you used. Running the same file again with the same settings produces the same groups, which matters when someone asks why a record disappeared.
  • Keep the Mark groups output alongside the de-duplicated file. It records which rows were merged into which, so a wrong merge can be traced and undone.

Choosing a threshold: one list at three settings

These scores were measured with the tool on the example list above, using Jaro-Winkler with punctuation stripped. jon smith against john smith scores 0.973. acme ltd against acme limited scores 0.933. maria lopez against mario lopes scores 0.894. smith jon against jon smith scores 0.407.

At 0.95 only the Smith pair groups, leaving the two Acme rows apart. At 0.90 the Acme rows join as well, while Maria and Mario stay separate. At 0.85 Maria and Mario are merged too, which is right if they are one misspelt person and wrong if they are a married couple. No threshold is correct for every list; the review table exists so you can see which pairs sit near the line.

The two methods give very different numbers for the same pair. With Levenshtein, jon smith against john smith is 0.900 and acme ltd against acme limited is only 0.667, because four extra letters are four edits out of twelve characters. Thresholds that work for Jaro-Winkler are usually too strict for Levenshtein, so start lower, around 0.80, when you switch.

Large files and the blocking rule

Comparing every pair grows with the square of the row count: 3,000 rows make 4,498,500 pairs. Above 3,000 rows with a non-blank key, the tool switches to blocking. A row is only compared with rows whose key, with the | separators removed, starts with the same two characters, and also with rows whose key starts with the same two characters once its words are sorted alphabetically. If one of those blocks still holds more than 3,000 rows, its rows are sorted by key and each row is compared only with the next 200 rows in that order, so a near-duplicate that sorts far from its match can be missed.

The cost of blocking is recall. Two rows that differ in their first two characters, such as Kathryn Lee and Cathryn Lee, are never compared in a large file, so they cannot be grouped. The status line under Output Preview says when blocking was used. If you need those matches, split the file into parts of 3,000 rows or fewer that are likely to contain each other's duplicates, such as one part per city. Files over 20,000 rows are refused.

Frequently asked questions

Which row is kept from each group?

The one that appears first in the file. Sort the file before running if you want a particular row kept, for example the most recently updated record at the top.

Why are Smith, Jon and Jon Smith not grouped?

Both similarity measures compare characters in order, so reversed words score low (0.407 here). Put names in one consistent order, or split them into separate columns, before matching.

Does Remove duplicates merge the fields of the grouped rows?

No. It keeps the first row of each group unchanged and drops the others. If a later row holds a phone number the first row lacks, copy it across before removing duplicates.

What score does an exact match get?

1.000. Rows whose keys are identical after normalisation always group, at any threshold.