node.bcrypt.js
Reasonable, with limits. 7th of 10 cryptography and password hashing.
node.bcrypt.js (npm `bcrypt`) is the native C++ bcrypt binding for Node.js. It works, it is fast, and many codebases use it. For new projects it is a fair choice with real limits: OWASP now treats bcrypt as a legacy option behind Argon2id, it needs a native build, and its maintenance has slowed to almost nothing since the v6.0.0 release in April 2025.
Best for: Node.js server teams that already store bcrypt hashes and want the fastest bcrypt verification on a standard Linux, macOS or Windows host.
Scores
Overall5.4
How strongly do we recommend it for a new project today?
Claude Opus 5.5: 5.0, likely 4.0 to 6.0
It is a correct, fast bcrypt that is still fine where it already runs. For new work, node-argon2 follows current OWASP guidance and is better maintained, and bcryptjs gives the same algorithm without native build trouble. Slowed maintenance, below-median growth and an open memory-safety report keep it in the middle of the category.
- peers node-argon2: argon2 had 51 commits in the last year, a 2026 release and 7x growth.
- pkgpulse.com/guides/bcrypt-vs-argon2-vs-scrypt-password-hashing-2026: The guide recommends Argon2id for new projects and bcryptjs when native dependencies are a problem.
- github releasesLastYear: No release in the last year.
GPT-6.2 Sol: 5.7, likely 4.5 to 6.8
bcrypt 6.0.0 is a reasonable choice for a new Node.js service that must verify existing $2a$ or $2b$ hashes. For a new password store, node-argon2 offers OWASP’s preferred Argon2id and has a more active release history. bcrypt.js is easier to deploy where native addons are impractical. The recommendation depends most on existing hash compatibility, and the slow release pace adds uncertainty about future runtime support.
- github.com/kelektiv/node.bcrypt.js/blob/v6.0.0/README.md: Supported hash formats and documented deployment requirements
- cheatsheetseries.owasp.org/cheatsheets/Password_Storage_Cheat_Sheet.html: OWASP prefers Argon2id for new password stores
- github.com/ranisalt/node-argon2: Defaults to Argon2id and includes password verification and TypeScript declarations
- github.com/dcodeIO/bcrypt.js: Compatible pure-JavaScript implementation with built-in types
- github releasesLastYear and peers node-argon2: No bcrypt releases in the past year and a recent node-argon2 release
Needed by many4.9
How many developers need a tool for this job?
Claude Opus 5.5: 5.5, likely 4.5 to 6.5
Many backend developers who run their own login need password hashing, but many others hand auth to a provider. This package covers only bcrypt, and only in Node-compatible server runtimes that load native addons. It does none of the category's signing or encryption work, so it is narrower than the category.
- category scope: Package only hashes passwords with bcrypt; it does not sign or encrypt.
- pkgpulse.com/guides/bcrypt-vs-argon2-vs-scrypt-password-hashing-2026: Native C++ binding that requires node-gyp, so it is limited to server runtimes.
GPT-6.2 Sol: 4.2, likely 3.1 to 5.3
Password hashing serves a sizable group of developers who manage their own sign-in systems. This package covers bcrypt password hashing on Node.js, leaving signing and encryption to other tools. The developer survey measures Node.js use, so the share of developers who specifically need bcrypt remains an estimate.
- survey.stackoverflow.co/2026/technology/data: 46.4% of respondents to the web technology question used Node.js
- github.com/kelektiv/node.bcrypt.js/blob/v6.0.0/README.md: Documents a native Node.js module for bcrypt password hashing
- github.com/dcodeIO/bcrypt.js: The pure-JavaScript peer also runs in browsers
Helps a lot6.2
How well does it do the job for those who need it?
Claude Opus 5.5: 5.5, likely 4.5 to 6.5
It does bcrypt correctly and fast, with a small, well-known API. But bcrypt itself is now the legacy choice: it truncates at 72 bytes and is not memory-hard. Types are not bundled, and native installs still fail on some platforms. For most new projects, node-argon2 does the same job better, and bcryptjs avoids the build problems.
- cheatsheetseries.owasp.org/cheatsheets/Password_Storage_Cheat_Sheet.html: OWASP lists Argon2id first and bcrypt for legacy systems, with a 72-byte limit.
- pkgpulse.com/guides/bcrypt-vs-argon2-vs-scrypt-password-hashing-2026: Benchmark: about 65ms at cost 10; the guide recommends Argon2id for new projects.
- npm hasTypes: No bundled TypeScript types.
- github.com/kelektiv/node.bcrypt.js/issues: Open issues report MODULE_NOT_FOUND after build, Alpine install trouble and node-abi errors.
GPT-6.2 Sol: 6.8, likely 5.6 to 7.9
Version 6.0.0 has a small, well-documented API, and its async methods move CPU-heavy work off the main event loop. The silent 72-byte cutoff and limited hash-prefix support put input and migration checks on callers. The examples are straightforward for coding agents to follow, though there is little direct evidence that agents handle those edge cases consistently. Argon2id offers memory-hard hashing for new password stores.
- github.com/kelektiv/node.bcrypt.js/blob/v6.0.0/README.md: Documents async methods, thread-pool behavior, truncation and supported prefixes
- archive.fosdem.org/2024/events/attachments/fosdem-2024-2890-unraveling-javascript-s-heart-mastering-the-event-loop-for-peak-performance/slides/22179/Fosdem_Event_loop_peak_performance_2024_02_04_1_Ynt6Yvs.pdf: Independent Rosa engineering talk compares native bcrypt and bcrypt.js on the event loop
- github.com/kelektiv/node.bcrypt.js/issues/849: Users report friction migrating PHP hashes with a $2y$ prefix
- cheatsheetseries.owasp.org/cheatsheets/Password_Storage_Cheat_Sheet.html: Recommends Argon2id for new password storage and reserves bcrypt for legacy use
- npmjs.com/package/%40types/bcrypt: DefinitelyTyped publishes separate declarations for version 6
Holds up over time4.4
Will it still be a good choice in two years?
Claude Opus 5.5: 4.0, likely 3.0 to 5.5
The project had 6 commits and no releases in the last year, and the last release, v6.0.0, came out in April 2025. The Scorecard Maintained check is 0. A July 2026 report of a possible out-of-bounds read, and an issue about npm's plan to block install scripts, are still open. The repository is not archived, and bcrypt is a stable algorithm that needs little change, so it is not abandoned. But the ecosystem is moving toward Argon2id and pure-JS or WASM builds.
- github commitsLastYear / releasesLastYear: 6 commits and 0 releases in the last year.
- scorecard Maintained: Maintained check scores 0.
- github.com/kelektiv/node.bcrypt.js/releases: v6.0.0 (April 2025), which moved to prebuildify, is the latest release.
- github.com/kelektiv/node.bcrypt.js/issues: Open #1226 (npm install-script RFC) and #1228 (possible OOB read in ValidateSalt).
GPT-6.2 Sol: 4.7, likely 3.4 to 6.1
The project recorded six commits and no releases in the past year, while node-argon2 recorded 51 commits and published in November 2026. Version 6 improved native packaging and raised the minimum Node.js version to 18, with npm publication following the GitHub release by nearly three weeks. npm lists five maintainers, and the recent release history leaves it unclear how many are active or how quickly the next runtime or packaging issue will get a fix.
- github commitsLastYear, releasesLastYear and npm latestPublishedAt: Six commits, zero releases in the past year and last npm publish in May 2025
- peers node-argon2: 51 commits in the past year and a November 2026 npm publish
- github.com/kelektiv/node.bcrypt.js/blob/master/CHANGELOG.md: Version 6 bundled native binaries and dropped support for Node.js 16 and older
- github.com/kelektiv/node.bcrypt.js/discussions/1196: Users repeatedly requested an npm publish after the GitHub release
- registry.npmjs.org/bcrypt: Registry metadata lists five maintainers
- github.com/kelektiv/node.bcrypt.js/pulls: Several 2026 pull requests, including a CI update, remain open
Used widely6.9
How many use it, and is that growing?
Claude Opus 5.5: 7.0, likely 6.0 to 7.5
About 33M downloads in 4 weeks and 286k dependent repositories put it among the most used password hashers. Its year-on-year ratio is about 2.8, below the 4.1 median, so it is losing ground. bcryptjs grew faster (3.8) and node-argon2 much faster (7.1). Bluesky and Hacker News attention is close to zero.
- npm downloadsLast4Weeks / downloadsSame4WeeksYearAgo: 33.2M now vs 11.9M a year ago, a ratio of about 2.8, below the 4.1 median.
- dependents repos: 286,301 dependent repos, close to bcryptjs at 302k and far above argon2 at 6k.
- peers bcrypt.js downloads: bcryptjs has more than twice the downloads and is growing faster.
- bluesky posts: Only 2 posts in 24 months.
GPT-6.2 Sol: 6.8, likely 5.7 to 7.9
ecosyste.ms found about 286,000 dependent repositories and 3,923 dependent packages, putting bcrypt close to bcrypt.js in repository footprint. Four-week downloads grew 2.8× year over year, below the catalog median of 4.1× and behind bcrypt.js at 3.8× and node-argon2 at 7.1×. That points to a large installed base losing relative ground. Repeat and transitive installs make the pace of new adoption uncertain.
- dependents repos and packages: 286,301 repositories and 3,923 packages in partial coverage
- npm downloadsLast4Weeks, downloadsSame4WeeksYearAgo and medianDownloadsRatio: 33.2 million versus 11.9 million downloads, or 2.8× against 4.1×
- peers bcrypt.js and node-argon2: bcrypt.js has about 302,000 dependent repos and both peers grew faster
- humanloads.dev/bcrypt: November 2026 download analysis accounts for crawlers and still includes CI and dependency installs
Vouched for5.6
Who stands behind it being good?
Claude Opus 5.5: 5.0, likely 4.0 to 6.5
Its long use in production, its many dependents and tutorials, and the wide trust in the bcrypt algorithm support it. Current independent guidance, OWASP and the 2026 comparison guides, ranks bcrypt behind Argon2id for new work. That weakens its endorsement today.
- dependents: 286k repos and 3.9k packages depend on it.
- cheatsheetseries.owasp.org/cheatsheets/Password_Storage_Cheat_Sheet.html: OWASP calls bcrypt a legacy option.
- npm-compare.com/argon2,bcrypt,bcrypt-nodejs,bcryptjs: Comparison pages present it as a mature native option next to bcryptjs and argon2.
GPT-6.2 Sol: 6.2, likely 5.0 to 7.4
Planka and France’s Observatoire de la qualité des démarches en ligne both declare bcrypt 6 as an application dependency. A FOSDEM comparison independently documented the native implementation’s event-loop behavior, and a 2026 Docker test reported that v6 resolved an older cross-platform loading failure. Version-specific comparisons and package-level satisfaction data are sparse, which limits confidence in how broadly those results apply.
- github.com/plankanban/planka/blob/master/server/package.json: Planka declares bcrypt 6 as a server dependency
- github.com/DISIC/observatoire.numerique.gouv.fr/blob/main/package.json: French government application declares bcrypt 6 as a runtime dependency
- archive.fosdem.org/2024/events/attachments/fosdem-2024-2890-unraveling-javascript-s-heart-mastering-the-event-loop-for-peak-performance/slides/22179/Fosdem_Event_loop_peak_performance_2024_02_04_1_Ynt6Yvs.pdf: Independent comparison of native bcrypt and bcrypt.js
- iloveblogs.blog/post/docker-run-fails-return-processdlopenmodule: Independent test verified v6 loaded and hashed on Debian and Alpine Node 22 images
Safe6.0
How safe is it to depend on?
Claude Opus 5.5: 6.0, likely 5.0 to 7.0
It has one old moderate advisory, fixed in v5.0.0 in 2020, an MIT licence and only 2 dependencies. But it is native C++ with an install script, its Scorecard is 3.6 with zeros for branch protection, signed releases, SAST and fuzzing, and a possible out-of-bounds read report from July 2026 has no fix released yet.
- advisories: 1 advisory in total (2020, moderate), none in the last 24 months.
- scorecard score: Scorecard 3.6, with many weak checks.
- npm dependencies: 2 dependencies; MIT licence.
- github.com/kelektiv/node.bcrypt.js/issues: Open #1228: possible out-of-bounds read in ValidateSalt.
GPT-6.2 Sol: 6.0, likely 4.8 to 7.3
The MIT-licensed package has two direct dependencies and an install script that can build its native addon. The only listed advisory was fixed in 5.0.0, about four months after the public bug report and before the GitHub advisory appeared. The 3.6 OpenSSF Scorecard flags weak workflow token permissions, branch protection, dependency pinning and release signing. The npm registry identifies the v6 publisher and provides a registry signature, while build provenance and current release practices remain less clear.
- scorecard score and checks: 3.6 overall, with zeros for token permissions, branch protection and signed releases
- npm dependencies and license: Two direct dependencies and a permissive MIT license
- github.com/advisories/GHSA-5wg4-74h6-q47v: Moderate advisory from 2020, patched in 5.0.0
- github.com/kelektiv/node.bcrypt.js/issues/776: Public report dates to January 2020
- github.com/kelektiv/node.bcrypt.js/pull/806: Fix merged in June 2020
- registry.npmjs.org/bcrypt/6.0.0: Shows the publisher, registry signature and native install script
Good
- Native code makes it much faster than pure-JS bcryptjs at the same cost factor, so stronger work factors are practical.
- Its simple hash/compare API, with both promises and callbacks, has stayed stable for over a decade and AI agents write it correctly.
- v6 ships prebuilt binaries through prebuildify, so most common platforms install without compiling.
- Bcrypt hashes are portable across languages, which helps when moving users from PHP, Ruby or Python systems.
Bad
- Inputs longer than 72 bytes are truncated by the bcrypt algorithm, and OWASP lists bcrypt only as a legacy option behind Argon2id.
- It is a native addon with an install script, so it fails on edge runtimes, browsers and some Alpine or ARM setups, and npm's planned install-script blocking will affect it.
- There have been no releases since v6.0.0 in April 2025, only 6 commits in a year, and a July 2026 out-of-bounds read report is still open.
- It ships no bundled TypeScript types, so you need @types/bcrypt.
The numbers
- npm downloads, 4 weeks
- 33M ×2.8 in a year
- GitHub stars
- 7.8k
- Commits, 12 months
- 6
- npm version
- 6.0.0 May 2025
- Versions, 12 months
- 0
- Advisories, 24 months
- 0 of 1 ever
- OpenSSF Scorecard
- 3.6 out of 10, Nov 2026
- Licence
- MIT
Read on 21 November 2026 from GitHub (kelektiv/node.bcrypt.js), npm (bcrypt), OSV and the OpenSSF Scorecard.
Cryptography and password hashing
- 8.2noble-curves
- 8.1noble-hashes
- 7.8node-argon2
- 7.4libsodium.js
- 6.5hash-wasm
- 6.2bcrypt.js
- 5.4node.bcrypt.js
- 4.9Forge
- 4.5TweetNaCl.js
- 1.7crypto-js