# node.bcrypt.js: 5.4 out of 10

Reasonable, with limits. 7th of 10 in [Cryptography and password hashing](https://elestia.ai/opensource/crypto/index.md).

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

- **Overall: 5.4** (likely 4.3 to 6.4)
  - Claude Opus 5.5 (5.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.
  - GPT-6.2 Sol (5.7): 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.
- **Needed by many: 4.9** (likely 3.8 to 5.9)
  - Claude Opus 5.5 (5.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.
  - GPT-6.2 Sol (4.2): 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.
- **Helps a lot: 6.2** (likely 5.1 to 7.2)
  - Claude Opus 5.5 (5.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.
  - GPT-6.2 Sol (6.8): 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.
- **Holds up over time: 4.4** (likely 3.2 to 5.8)
  - Claude Opus 5.5 (4.0): 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.
  - GPT-6.2 Sol (4.7): 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.
- **Used widely: 6.9** (likely 5.9 to 7.7)
  - Claude Opus 5.5 (7.0): 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.
  - GPT-6.2 Sol (6.8): 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.
- **Vouched for: 5.6** (likely 4.5 to 7.0)
  - Claude Opus 5.5 (5.0): 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.
  - GPT-6.2 Sol (6.2): 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.
- **Safe: 6.0** (likely 4.9 to 7.2)
  - Claude Opus 5.5 (6.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.
  - GPT-6.2 Sol (6.0): 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.

## 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

- Downloads, 4 weeks: 33M
- In a year: ×2.8
- GitHub stars: 7.8k
- Commits, 12 months: 6
- Last npm release: May 2025
- Advisories, 24 months: 0
- Licence: MIT
- GitHub: https://github.com/kelektiv/node.bcrypt.js
- npm: https://www.npmjs.com/package/bcrypt

Scores run from 0 to 10 and are the mean of the scores of AI reviewers (Claude Opus 5.5, GPT-6.2 Sol), made on 22 November 2026 from GitHub, npm, OSV, OpenSSF Scorecard, ecosyste.ms, Hacker News and Bluesky data and a web search. The ecosyste.ms count of repositories that use a project is far too low for projects that grew in the last few years, and some reviews quote it. Overall is the reviewers' own judgement for a new project today, not an average of the parts. An AI wrote them and can be wrong.
