Fuse.js
Lightweight fuzzy-search library, with zero dependencies.
Trusted by teams at Google, Microsoft, Anthropic, Atlassian, Spotify, MongoDB, Vercel, Adobe, Signal, HashiCorp, SAP, IBM, Nvidia, Grafana, Elastic, Datadog, PostHog, Mapbox, and more.
Try the 7.6 beta: fuzzy search is 3–10x faster
npm install fuse.js@beta. Fuzzy and token search are much faster, with the same results in almost every case. If your rankings change or anything looks off, tell me in the beta feedback discussion. It helps decide what ships in 7.6.0.
Quick Example
import Fuse from 'fuse.js'
const books = [
{ title: "Old Man's War", author: 'John Scalzi' },
{ title: 'The Lock Artist', author: 'Steve Hamilton' },
{ title: 'JavaScript Patterns', author: 'Stoyan Stefanov' }
]
const fuse = new Fuse(books, {
keys: ['title', 'author'],
includeScore: true
})
fuse.search('jon')
// [{ item: { title: "Old Man's War", author: "John Scalzi" }, refIndex: 0, score: 0.25 }]
fuse.search('patterns')
// [{ item: { title: "JavaScript Patterns", ... }, refIndex: 2, score: 0.0 }]Features
- Fuzzy search — typo-tolerant matching powered by a fast bit-parallel matcher
- Token search — split multi-word queries into terms, fuzzy-match each, rank with IDF
- Extended search — operators for exact, prefix, suffix, inverse, and include matching
- Logical search —
$and/$orexpressions for structured queries - Weighted keys — boost fields like
titleoverdescription - Nested search — dot notation, array notation, or custom
getFn - Zero dependencies — works in the browser, Node.js, and Deno
- Two builds — full (~8.6 kB gzip) or basic (~6.8 kB gzip)
Get Started
npm install fuse.jsSee Getting Started for installation options, builds, and imports.
Building for Apple platforms?
fuse-swift is the official Swift port for iOS, macOS, tvOS, watchOS, visionOS, and Linux. Byte-equivalent results, idiomatic Swift API. Currently in release candidate.

