Technology moves fast! ⚡ Don't get left behind.🚶 Subscribe to our mailing list to keep up with latest and greatest in open source projects! 🏆

Subscribe to our mailing list


:crystal_ball: Tiny and blazing-fast fuzzy search in JavaScript

Subscribe to updates I use fuzzysearch

Statistics on fuzzysearch

Number of watchers on Github 2067
Number of open issues 1
Average time to close an issue about 2 hours
Main language JavaScript
Average time to merge a PR about 3 hours
Open pull requests 0+
Closed pull requests 7+
Last commit about 3 years ago
Repo Created over 4 years ago
Repo Last Updated over 1 year ago
Size 15 KB
Organization / Authorbevacqua
Page Updated
Do you use fuzzysearch? Leave a review!
View fuzzysearch activity
View on github
Fresh, new opensource launches 🚀🚀🚀
Trendy new open source projects in your inbox! View examples

Subscribe to our mailing list

Evaluating fuzzysearch for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)


Tiny and blazing-fast fuzzy search in JavaScript

Fuzzy searching allows for flexibly matching a string with partial input, useful for filtering data very quickly based on lightweight user input.


To see fuzzysearch in action, head over to, which is a demo of an autocomplete component that uses fuzzysearch to filter out results based on user input.


From npm

npm install --save fuzzysearch

fuzzysearch(needle, haystack)

Returns true if needle matches haystack using a fuzzy-searching algorithm. Note that this program doesn't implement levenshtein distance, but rather a simplified version where there's no approximation. The method will return true only if each character in the needle can be found in the haystack and occurs after the preceding matches.

fuzzysearch('twl', 'cartwheel') // <- true
fuzzysearch('cart', 'cartwheel') // <- true
fuzzysearch('cw', 'cartwheel') // <- true
fuzzysearch('ee', 'cartwheel') // <- true
fuzzysearch('art', 'cartwheel') // <- true
fuzzysearch('eeel', 'cartwheel') // <- false
fuzzysearch('dog', 'cartwheel') // <- false

An exciting application for this kind of algorithm is to filter options from an autocomplete menu, check out horsey for an example on how that might look like.

But! RegExps...!

chart showing abysmal performance for regexp-based implementation

The current implementation uses the algorithm suggested by Mr. Aleph, a crazy russian compiler engineer working at V8.



fuzzysearch list of languages used
Other projects in JavaScript