JavaScript fuzzy search libraries

Updated Nov 2026

JavaScript fuzzy search libraries match a query against a list of strings or objects even when the spelling differs. Each library scores how closely the query's characters appear in an item and returns the items ranked by that score. These libraries run the command palettes, autocomplete boxes, and quick filters in web apps and code editors.

Popularity

fuzzysort has the most monthly downloads in this comparison, at 77.8M.

LibraryMonthly downloadsStarsLast releaseLicense
fuzzysort
77.8M
4.4KAug 2026MIT
fuse.js
76.1M
20.5KJul 2026Apache-2.0
@tanstack/match-sorter-utils
33.0M
Not on GitHubOct 2026MIT
fuzzy
31.6M
Not on GitHubOct 2016MIT
match-sorter
18.5M
Not on GitHubNov 2026MIT
fzf
18.3M
956Apr 2023BSD-3-Clause
fast-fuzzy
8.4M
388Nov 2022ISC
microfuzz
3.6M
Not on GitHubJul 2023MIT
Downloads: npm, last thirty days. Stars and releases: GitHub. Amber: no release in over a year.

Libraries and code examples

Ranks fuzzy matches across strings or selected object fields.

Downloads / mo
77.8M
Stars
4.4K
Last release
4.0.2
License
MIT

Strengths

  • Combines nested fields and scoring. Search nested fields and adjust ranking with scoreFn.
  • Normalizes accents and lookalike characters. Searches strip diacritics and remap common character variants.

Limitations

  • Cloned results lose getter behavior. Use fuzzysort.score and fuzzysort.highlight for results passed through structured cloning.
  • Current release uses ES modules. Use ES module imports when adopting the current major release.

Quickstart

From README.md
$ npm install fuzzysort
import fuzzysort from 'fuzzysort'

const results = fuzzysort.go('mr', ['Mercury', 'Mars'])

fuzzysort examples

From open-source projects on GitHub

Searches text and object fields using approximate string matching.

Downloads / mo
76.1M
Stars
20.5K
Last release
7.5.0
License
Apache-2.0

Strengths

  • Weights different text fields. Give title matches more weight than description matches.
  • Moves matching into browser workers. Use FuseWorker for searches that return promises.

Limitations

  • Penalizes matches far into text. Set ignoreLocation to match text regardless of its starting position.
  • Worker mode excludes token search. Use the standard Fuse class when enabling useTokenSearch.

Quickstart

From fuse.d.ts
$ npm install fuse.js
import Fuse from 'fuse.js'

const fuse = new Fuse([{ title: 'Mercury' }], { keys: ['title'] })
const results = fuse.search('mercury')

fuse.js examples

From open-source projects on GitHub

@tanstack/match-sorter-utils

Splits match-sorter's ranking into separate filtering and sorting phases.

Downloads / mo
33.0M
Last release
9.2.6
License
MIT

Strengths

  • Ranks items one at a time. Call rankItem, then filter on its passed flag and sort on its rank.

Limitations

  • Lower level than match-sorter. Combine the filter and sort steps in application code.

Quickstart

From index.ts
$ npm install @tanstack/match-sorter-utils
import { rankItem } from '@tanstack/match-sorter-utils'

const match = rankItem('Mercury', 'mer')

@tanstack/match-sorter-utils examples

From open-source projects on GitHub

Filters a list of strings with a small, standalone fuzzy matcher in the browser or Node.js.

Downloads / mo
31.6M
Last release
0.1.3
License
MIT

Strengths

  • Marks matched characters. Pass pre and post strings to wrap each matched character.

Quickstart

From README.md
$ npm install fuzzy
const fuzzy = require('fuzzy')

const results = fuzzy.filter('mr', ['Mercury', 'Mars'])

fuzzy examples

From open-source projects on GitHub
export function fuzzySearch(text, list, filter) {
  const fuzzy = require('fuzzy');
  return fuzzy.filter(text, list, {
    extract: filter
  });
}

Sorts an array by best match with deterministic rules.

Downloads / mo
18.5M
Last release
8.3.1
License
MIT

Strengths

  • Ranks exact matches first. Exact matches rank above prefix matches and looser matches.
  • Limits ranking per key. Give each key its own threshold or maximum ranking.

Quickstart

From README.md
$ npm install match-sorter
import { matchSorter } from 'match-sorter'

const results = matchSorter(['Mercury', 'Mars'], 'mr')

match-sorter examples

From open-source projects on GitHub

Finds ranked subsequence matches with configurable selection and tie-breaking.

Downloads / mo
18.3M
Stars
956
Last release
0.5.2
License
BSD-3-Clause

Strengths

  • Controls ranking when scores tie. Use tiebreakers to prefer shorter or earlier matches.
  • Returns matched character positions. Read positions to highlight the characters that matched.

Limitations

  • Async queries cancel earlier searches. Handle cancellation rejections when issuing overlapping AsyncFzf queries.
  • Tie-breaking requires sorted output. Keep sort enabled when configuring tiebreakers.

Quickstart

From main.d.ts
$ npm install fzf
import { Fzf } from 'fzf'

const fzf = new Fzf(['Mercury', 'Mars'])
const results = fzf.find('mr')

fzf examples

From open-source projects on GitHub

Scores approximate text matches and reuses candidate lists through Searcher.

Downloads / mo
8.4M
Stars
388
Last release
1.12.0
License
ISC

Strengths

  • Reuses candidates across searches. Create a Searcher to retain its candidate search structure.
  • Retains original-string match offsets. Use returnMatchData to locate matches in the original text.

Limitations

  • One-off search rebuilds candidates. Use Searcher for repeated queries instead of calling search each time.
  • Offsets depend on substring mode. Keep useSellers enabled when the result needs match offsets.

Quickstart

From README.md
$ npm install fast-fuzzy
const { search } = require('fast-fuzzy')

const results = search('mercury', ['Mercury', 'Mars'])

fast-fuzzy examples

From open-source projects on GitHub
(songs, artists) => new Searcher(songs.result as unknown as object[], {
    keySelector: ((songId: number) => {
      const song = songs.entities[songId]
      const artist = artists.entities[song.artistId]
      return fold(`${artist?.name ?? ''} ${song.title}`)
    }) as unknown as (s: object) => string,
    threshold: THRESHOLD,
  })

microfuzz

Filters items in memory and returns the matched character ranges for highlighting.

Downloads / mo
3.6M
Last release
1.0.0
License
MIT

Strengths

  • Matches words in any order. A query's words can match in any order in the text.
  • Ignores case and accents. A query matches text regardless of letter case and diacritics.

Limitations

  • No typo tolerance. Transposed or missing characters stop a match.

Quickstart

From index.d.ts
$ npm install @nozbe/microfuzz
import createFuzzySearch from '@nozbe/microfuzz'

const search = createFuzzySearch(['Mercury', 'Mars'])
const results = search('mr')

FAQ

Fuse.js fits searching objects with weighted fields. fuzzysort fits ranking short strings such as file names, and match-sorter fits a filter box that needs a predictable ranking order.

Fuse.js is a fuzzy-search library with no dependencies that searches strings and object fields in the browser or on a server. Weighted keys let title matches rank above description matches.

fuzzysort matches the query's characters in order and ranks short strings such as file names. Fuse.js scores approximate matches across weighted object fields.

Fuse.js scores a match lower the farther it starts from the expected location. Setting ignoreLocation to true removes that penalty.

For coding agents

Found your fuzzy search library? Help your agent use it.

Connect Exa so your coding agent can find the library’s documentation, check its API, and look up implementations while you build.

Run in your terminal

claude plugin install exa@claude-plugins-official