explaingit

krisk/fuse

Analysis updated 2026-06-21

20,245JavaScriptAudience · developerComplexity · 2/5Setup · easy

TLDR

A lightweight JavaScript library that adds fuzzy search to your app, it finds results even when users make typos, running entirely in the browser with no backend or server needed.

Mindmap

mindmap
  root((repo))
    What It Does
      Fuzzy string search
      Typo tolerant
      Client side only
    Tech Stack
      JavaScript TypeScript
      No dependencies
      8 KB compressed
    Use Cases
      Search documentation
      Filter product catalog
      Autocomplete inputs
    Features
      Field weighting
      Match highlighting
      AND OR logic
    Getting Started
      npm install
      CDN script tag
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Add search to a documentation site or blog so readers find articles even when they misspell words.

USE CASE 2

Build a searchable product catalog or contact list that works entirely in the user's browser without a server.

USE CASE 3

Create a typo-tolerant autocomplete input over a list of up to 100,000 documents using Web Workers.

USE CASE 4

Filter a list of items with AND/OR logic and highlight exactly which characters matched the query.

What is it built with?

JavaScriptTypeScript

How does it compare?

krisk/fuseknex/knexverekia/js-stack-from-scratch
Stars20,24520,27520,195
LanguageJavaScriptJavaScriptJavaScript
Setup difficultyeasyeasymoderate
Complexity2/52/53/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

In plain English

Fuse.js is a lightweight JavaScript library that lets you add search to your app without needing a backend server or database. It specializes in "fuzzy" search, meaning it finds results even when the user types something slightly wrong, like "javscript" instead of "JavaScript." It works both in the browser and on the server, and is meant for searching small-to-medium collections of data entirely on the client's machine. The library uses an algorithm called Bitap for approximate string matching, which means it can handle typos and partial matches. You set it up by passing your data (like a list of books or articles) and telling it which fields to search (like title or author). Results come back ranked by relevance. You can also weight fields differently, for example, a match in the title might count more than a match in the description. More advanced features include exact-match operators, multi-word token search with typo tolerance per word, combining conditions with AND/OR logic, and character-level match highlighting so you can visually mark which parts of a result matched the query. A newer beta feature called FuseWorker runs searches in parallel across Web Workers, background threads that keep the browser's main interface responsive, for large datasets of around 100,000 documents. You would use Fuse.js when building a website or app where you want users to search through a list of items, product catalogs, documentation, blog posts, or any collection, without setting up a dedicated search service like Elasticsearch. It is written in TypeScript, has no external dependencies, and ships as a tiny file (around 8 kilobytes compressed). Installation is through npm or a CDN script tag.

Copy-paste prompts

Prompt 1
Using Fuse.js, set up fuzzy search over a list of book objects with title and author fields, where title matches count double.
Prompt 2
How do I configure Fuse.js to highlight which characters matched the search query so I can show them in bold in my UI?
Prompt 3
Show me how to use Fuse.js extended search operators to find items that match one term but not another.
Prompt 4
Set up Fuse.js on a product catalog with name, description, and category fields and show results ranked by relevance.

Frequently asked questions

What is fuse?

A lightweight JavaScript library that adds fuzzy search to your app, it finds results even when users make typos, running entirely in the browser with no backend or server needed.

What language is fuse written in?

Mainly JavaScript. The stack also includes JavaScript, TypeScript.

How hard is fuse to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is fuse for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub krisk on gitmyhub

Verify against the repo before relying on details.