Skip to content
New in 2.5 Dutch language pack, from our first community contributor

Fuzzy string matching for JavaScript and TypeScript. Typos, accents, word order, numbers in words and noise like "(feat. X)" are handled for you, in about 10 kB with zero dependencies.

Get started
$ npm i fuzzy-toolkit
  • Node 18+
  • Every browser
  • TypeScript
  • React hook
  • CDN
  • Command line
  • MCP server
check(answer, expected)live

Matching letters show here.

0score / 100
  • frvingt et un21
  • estreinta y dos32
  • deeinundzwanzig21
  • itventitré23
  • nleenentwintig21
  • entwenty one21
  • frquatre-vingt-dix90
  • enthe BeatlesBeatles
The problem

=== says no. Your users meant yes.

Strict equality
'Bohemian Rhapsody' === 'bohemian rapsody'

false A right answer, marked wrong.

fuzzy-toolkit
check('bohemian rapsody', 'Bohemian Rhapsody')

correct · 94.12 One letter off, still the right song.

Why fuzzy-toolkit

Everything people get almost right.

One smart score that forgives the way humans really type, and a function for each job.

Right by default

On 3,000 simulated blind-test guesses, 97.6% of right answers were accepted and 0% of wrong ones.

97.6%accepted

Search as you type

Prefixes, typos and acronyms, with the letters to highlight.

Your editor knows it

Written in TypeScript. Every option autocompletes.

compare(a, b, { pre
  • preset
  • phonetic
  • partial

Tiny, no baggage

ESM and CommonJS, Node 18+ and every browser. Language packs only weigh in when you import them.

~10 kBmin + gzip
0dependencies

Made for real data

The music preset drops featurings, "Remastered" and leading articles.

Imagine (Remastered 2010)
the beatles

Ready for AI agents

An MCP server for Claude, Cursor and VS Code, and ai-setup to teach your assistant the API.

$ npx fuzzy-toolkit mcp
✓ compare, closest, search,
dedupe, join, check, find
faster than Fuse.js on search as you type, and it finds more
7×
faster than string-similarity for "did you mean"
33×
of lines covered by tests, plus fuzz tests
98%
languages for numbers in words, articles and sounds
6
Benchmarks

Finds more. Waits less.

300 typed queries with a typo, over 23,450 song titles. fuzzy-toolkit finds more than Fuse.js, 7 times faster.

Methodology and all results
Wanted title found in the top 10
fuzzy-toolkit82.7% · 11.0 ms / query
Fuse.js65.3% · 81.6 ms / query
fuzzysort21.7% · 0.8 ms / query

Node 22, median of 7 runs, public data. Run npm run bench:versus yourself.

One line per job

No configuration to learn before the first result.

import { check } from 'fuzzy-toolkit'

check('bohemian rapsody', 'Bohemian Rhapsody')

→{ verdict: 'correct', score: 94.12 }

Command line

Clean a CSV without writing code.

dedupe, group, join, search and compare, straight from your terminal. CSV, JSON or plain text in, the same format out.

Command line recipe
  • Signed provenance

    Every version is published from GitHub Actions with npm provenance. Check it with npm audit signatures.

  • Zero dependencies

    Nothing else gets installed with it. CI fails if one sneaks in.

  • Tested hard

    Golden results, 98% coverage and fuzz tests on random Unicode, on Node 18 to 24.

  • OpenSSF Best Practices

    Passing badge, Scorecard checked weekly, CodeQL on every change.

Your first match, one line away.

Install it, import one function, done. The guide takes five minutes.

Built in the open. Meet the contributors · Support the project on Ko-fi