explaingit

krisk/fuse

📈 Trending20,259JavaScriptAudience · developerComplexity · 2/5ActiveLicenseSetup · easy

TLDR

Lightweight JavaScript library for fuzzy search on the client side, finding results even with typos, without needing a backend server.

Mindmap

mindmap
  root((Fuse.js))
    What it does
      Fuzzy search
      Typo tolerance
      Client-side only
    Key features
      Field weighting
      Match highlighting
      AND/OR logic
      Web Worker support
    Use cases
      Product catalogs
      Documentation search
      Blog post search
    Tech stack
      JavaScript
      TypeScript
      Web Workers

Things people build with this

USE CASE 1

Add search to a product catalog or e-commerce site so users can find items even with spelling mistakes.

USE CASE 2

Build a searchable documentation site where users can find pages by partial or fuzzy matches.

USE CASE 3

Create a blog or article search feature that ranks results by relevance without a backend database.

USE CASE 4

Search through a list of contacts, books, or any collection stored locally in the browser.

Tech stack

JavaScriptTypeScriptWeb Workers

Getting it running

Difficulty · easy Time to first run · 5min
Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

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
Show me how to set up Fuse.js to search a list of products by name and description, with typo tolerance.
Prompt 2
How do I use Fuse.js to highlight which parts of a search result matched the user's query?
Prompt 3
I have 100,000 documents to search. How do I use FuseWorker to keep my app responsive?
Prompt 4
How do I weight search results so matches in the title count more than matches in the body?
Prompt 5
Set up Fuse.js with AND/OR logic so users can combine multiple search conditions.
Open on GitHub → Explain another repo

Generated 2026-05-18 · Model: sonnet-4-6 · Verify against the repo before relying on details.