bcrypt.js
Reasonable, with limits. 6th of 10 cryptography and password hashing.
bcrypt.js is a pure-JavaScript bcrypt with no dependencies and built-in TypeScript types. It is correct, mature and very widely used. But OWASP now ranks bcrypt below Argon2id and scrypt for new systems, and the code is slower than the native binding, so it is a sound but second-tier choice for new work.
Best for: Teams that need bcrypt, or compatibility with existing bcrypt hashes, where native addons cannot be built, such as serverless functions, restricted build images or non-Node runtimes.
Scores
Overall6.2
How strongly do we recommend it for a new project today?
Claude Opus 5.5: 6.0, likely 5.0 to 7.0
It is a reliable, dependency-free bcrypt that suits places where native addons cannot be built, and it reads hashes from native bcrypt. For a new project, Argon2id through node-argon2, or hash-wasm where native code is a problem, follows current OWASP guidance better. Maintenance is quiet and rests on one person. It is a reasonable pick, but not the default.
- cheatsheetseries.owasp.org/cheatsheets/Password_Storage_Cheat_Sheet.html: bcrypt is legacy-only in current OWASP guidance
- npm downloadsLast4Weeks: Huge use, but growing slightly below the median
- github commitsLastYear: No activity in the last year
- codeforgeek.com/bcrypt-vs-bcryptjs: Best when native dependencies are the blocker
GPT-6.2 Sol: 6.3, likely 5.1 to 7.4
bcrypt.js is a sound choice when existing bcrypt hashes must work in a deployment that cannot rely on native addons. For a fresh Node.js password store, node-argon2 offers OWASP’s preferred Argon2id algorithm and shows stronger maintenance and download momentum. bcrypt.js has credible downstream use, but the release gap and weak repository controls lower confidence in it as a new dependency.
- raw.githubusercontent.com/dcodeIO/bcrypt.js/v3.0.3/README.md: Documents native bcrypt compatibility, portability, and the 72-byte limit.
- cheatsheetseries.owasp.org/cheatsheets/Password_Storage_Cheat_Sheet.html: Recommends Argon2id for new password storage.
- github.com/ranisalt/node-argon2/blob/master/README.md: node-argon2 uses Argon2id by default.
- raw.githubusercontent.com/parse-community/parse-server/release/src/password.js: Confirms a maintained downstream use for native-addon fallback.
- github.releasesLastYear; scorecard.score; peers.node-argon2: No bcrypt.js releases in the past year, a 3/10 Scorecard, and stronger node-argon2 activity.
Needed by many5.2
How many developers need a tool for this job?
Claude Opus 5.5: 6.0, likely 5.0 to 7.0
Most web apps that keep their own user accounts need password hashing, so this is a large group. But many apps hand login to an auth provider, and this library does only bcrypt, with no signing or encryption. That makes it narrower than its category.
- github description: Does one job only: bcrypt hashing
- dependents.repos: 302k dependent repos show wide need for password hashing
GPT-6.2 Sol: 4.4, likely 3.2 to 5.6
Password hashing is a common need for applications that manage their own credentials. bcrypt.js covers one password-hashing algorithm across Node.js and browsers, with its clearest use in systems that already store bcrypt hashes. Developer surveys establish how common web development is, but leave the share of teams that need bcrypt compatibility uncertain.
- survey.stackoverflow.co/2026/technology/data: Measures web development and language use, with no breakdown by password-hashing library.
- raw.githubusercontent.com/dcodeIO/bcrypt.js/v3.0.3/README.md: Documents the bcrypt API and support for Node.js and browsers.
- cheatsheetseries.owasp.org/cheatsheets/Password_Storage_Cheat_Sheet.html: Reserves bcrypt for legacy password storage when preferred options are unavailable.
Helps a lot6.6
How well does it do the job for those who need it?
Claude Opus 5.5: 6.0, likely 5.0 to 7.0
It is a correct, compatible bcrypt with sync and async APIs, types and ESM. The API is small, and AI agents write correct code for it easily. It is held back by slower pure-JS speed than native bcrypt, by the 72-byte limit, and by an algorithm that OWASP ranks behind Argon2id, which node-argon2 and hash-wasm provide.
- github.com/dcodeIO/bcrypt.js/releases: v3 added ESM, types, $2b$ default and an input-length helper
- cheatsheetseries.owasp.org/cheatsheets/Password_Storage_Cheat_Sheet.html: OWASP: Argon2id first, scrypt second, bcrypt only for legacy; 72-byte limit
- codeforgeek.com/bcrypt-vs-bcryptjs: Slower than native bcrypt; hashes compatible both ways
- npm hasTypes: Ships its own TypeScript types
GPT-6.2 Sol: 7.1, likely 6.0 to 8.1
Version 3.0.3 has a small, typed API with examples that make routine hash and compare calls easy to write and review. Callers must check for 72-byte truncation, and a user report shows that invalid work factors can produce misleading errors. The async API yields between chunks of CPU work on the JavaScript thread. An independent FXServer benchmark found native bcrypt faster, though the margin will vary with the runtime and workload.
- raw.githubusercontent.com/dcodeIO/bcrypt.js/v3.0.3/README.md: Documents typed calls, async scheduling, and the truncation check.
- gist.github.com/tabarra/87a84faf689bb6a0eb8c01d5a7e73ed1: FXServer native bcrypt ran 1.18–1.33 times as fast in tests against v3.0.3.
- github.com/dcodeIO/bcrypt.js/issues/173: Reports an unresolved work-factor validation issue in v3.0.3.
Holds up over time5.2
Will it still be a good choice in two years?
Claude Opus 5.5: 5.5, likely 4.0 to 7.0
The code is essentially finished. It had a major release and three fixes in 2025, but no commits or releases in the last 12 months, and one person maintains it. Only 1 issue is open, and a stable algorithm needs little change. Still, the field is moving toward Argon2id, and the bus factor is one.
- github commitsLastYear: 0 commits and 0 releases in the last year
- github latestRelease: v3.0.3 on 2025-11-02
- github.com/dcodeIO/bcrypt.js/issues: Only one open issue, a minor one from Jul 2026
- scorecard Maintained: Maintained check scores 0
GPT-6.2 Sol: 4.9, likely 3.7 to 6.3
The project recorded no commits or releases in the last year, while node-argon2 recorded 51 commits and shipped in November 2026. Version 3 changed the default module format and generated hash prefix, preserved existing hashes, and needed follow-up patches for types and module interoperability. npm lists one collaborator, and a July 2026 input-validation report remains open with a proposed fix. The stable bcrypt format keeps the library useful, but the small release team makes response times hard to predict.
- github.commitsLastYear; github.releasesLastYear; peers.node-argon2: Zero commits and releases for bcrypt.js versus 51 commits and a recent release for node-argon2.
- github.com/dcodeIO/bcrypt.js/releases: Documents the v3 changes and subsequent compatibility fixes.
- npmjs.com/package/bcryptjs: Lists one npm collaborator.
- github.com/dcodeIO/bcrypt.js/issues/173: The maintainer reopened the July report and a contributor proposed a fix in November.
Used widely7.5
How many use it, and is that growing?
Claude Opus 5.5: 8.0, likely 7.0 to 8.5
It has 79M downloads in 4 weeks and about 302k dependent repos, more than native bcrypt in both. That makes it one of the most used password hashers in JavaScript. Its download ratio of 3.79 is just below the 4.1 median, so it is slowly losing share, while node-argon2 grows much faster (7.1x).
- npm downloadsLast4Weeks: 79.3M now vs 20.9M a year ago, a ratio of 3.79
- medianDownloadsRatio: Median 4.1, so it is slightly losing ground
- dependents.repos: 301,987 repos, vs 286k for node.bcrypt.js and 6k for node-argon2
- peers node-argon2: Argon2 grew 7x year over year
GPT-6.2 Sol: 7.0, likely 5.9 to 8.0
Ecosyste.ms found about 302,000 dependent repositories, slightly ahead of native node.bcrypt.js and far ahead of node-argon2 in the same index. Four-week downloads rose from 20.9 million to 79.3 million, or 3.79×, below the 4.1× catalog median and node-argon2’s 7.06×. The package has 3,796 GitHub stars, while the snapshot found no matching Hacker News or Bluesky activity. Automated installs, framework dependencies, and continued v2 downloads make the share of fresh direct choices uncertain.
- dependents; peers.node.bcrypt.js; peers.node-argon2: 301,987 indexed repositories and 2,853 packages depend on bcrypt.js.
- npm.downloadsLast4Weeks; npm.downloadsSame4WeeksYearAgo; medianDownloadsRatio: Download growth was 3.79× against a 4.1× baseline.
- github.stars; hackerNews.stories; bluesky.posts: 3,796 stars and zero matching stories or posts in the supplied counts.
- npmjs.com/package/bcryptjs?activeTab=versions: Shows substantial downloads of the older v2.4.3 release.
- raw.githubusercontent.com/parse-community/parse-server/release/package.json: Parse Server installs bcrypt.js as a regular dependency.
Vouched for6.5
Who stands behind it being good?
Claude Opus 5.5: 5.5, likely 4.0 to 7.0
Many tutorials and comparisons name it as the standard pure-JS bcrypt, and hundreds of thousands of repos depend on it. But independent sources mostly present it as a fallback, and none recommends it first for new systems. We found no current benchmarks or survey data, and there is no Hacker News or Bluesky attention.
- pkgpulse.com/guides/bcrypt-vs-argon2-vs-scrypt-password-hashing-2026: Presents bcryptjs as a fallback when native deps fail; recommends Argon2id
- npm-compare.com/argon2,bcrypt,bcrypt-nodejs,bcryptjs: Compared as slower than native bcrypt but portable
- bluesky posts: 0 posts and 0 HN stories
GPT-6.2 Sol: 7.4, likely 6.2 to 8.4
Parse Server ships v3.0.3 as its fallback when a native bcrypt package is unavailable, and Strapi uses bcrypt.js for admin authentication on v2.4.3. Next.js documents it as a portability fallback, and an independent FXServer benchmark measured v3.0.3 directly. These sources support its use for portable bcrypt, with limited evidence about developer satisfaction or performance across production workloads.
- raw.githubusercontent.com/parse-community/parse-server/release/package.json: Parse Server pins v3.0.3 in its release branch.
- raw.githubusercontent.com/parse-community/parse-server/release/src/password.js: Parse Server falls back to bcrypt.js for password hashing and verification.
- github.com/strapi/strapi/blob/develop/packages/core/admin/server/src/services/auth.ts: Strapi uses bcrypt.js to hash and verify admin passwords.
- raw.githubusercontent.com/strapi/strapi/develop/packages/core/admin/package.json: Strapi pins the older v2.4.3 release.
- nextjs.org/learn/dashboard-app/setting-up-your-database: Next.js documents bcrypt.js as a fallback when native bcrypt is incompatible.
- gist.github.com/tabarra/87a84faf689bb6a0eb8c01d5a7e73ed1: Independent benchmark measures v3.0.3 hashing and verification.
Safe6.6
How safe is it to depend on?
Claude Opus 5.5: 7.0, likely 6.0 to 8.0
It has zero dependencies, no advisories ever, and a permissive BSD-3-Clause licence, so the attack surface is small. Against that, the OpenSSF Scorecard is 3/10, with no branch protection, no security policy, weak code review and one publisher. bcrypt's silent truncation at 72 bytes is a known pitfall the caller must handle.
- advisories total: 0 advisories
- npm dependencies: 0 dependencies
- scorecard score: 3/10; Branch-Protection, Security-Policy and Token-Permissions score 0
- npm license: BSD-3-Clause
GPT-6.2 Sol: 6.2, likely 4.9 to 7.5
The package has zero runtime dependencies, a permissive BSD-3-Clause licence, and zero recorded OSV advisories. The public workflow builds and tests before publishing with an npm token, and npm lists one collaborator. OpenSSF Scorecard gives it 3/10, with weak branch protection, code review, token permissions, and security reporting checks. Those checks and the quiet advisory record leave limited evidence about how quickly a serious incident would be handled.
- npm.dependencies; npm.license; advisories.total: Zero runtime dependencies, BSD-3-Clause, and zero recorded OSV advisories.
- scorecard.score; scorecard.checks: 3/10 overall, with low or zero review, branch protection, token permission, and security policy scores.
- raw.githubusercontent.com/dcodeIO/bcrypt.js/main/.github/workflows/publish.yml: Manually triggered workflow builds, tests, and publishes with an npm token.
- npmjs.com/package/bcryptjs: Lists one npm collaborator.
Good
- Zero dependencies and no native build step, so it installs anywhere JavaScript runs.
- Its hashes work in both directions with the native bcrypt package, so you can switch between them without rehashing.
- v3 ships ESM with a UMD fallback, bundled TypeScript types and $2b$ hashes by default.
- No known security advisories in more than ten years on npm.
Bad
- bcrypt is a legacy-tier algorithm in OWASP guidance; Argon2id is preferred for new systems.
- Pure JavaScript is slower than the native bcrypt binding, so each hash costs more CPU on busy login servers.
- The 72-byte input limit is still the caller's problem; v3 only adds a helper to check the length.
- One maintainer, no commits in the last year, and weak OpenSSF Scorecard practices (3/10).
The numbers
- npm downloads, 4 weeks
- 79M ×3.8 in a year
- GitHub stars
- 3.8k
- Commits, 12 months
- 0
- npm version
- 3.0.3 Nov 2025
- Versions, 12 months
- 0
- Advisories, 24 months
- 0 of 0 ever
- OpenSSF Scorecard
- 3.0 out of 10, Nov 2026
- Licence
- BSD-3-Clause
Read on 21 November 2026 from GitHub (dcodeIO/bcrypt.js), npm (bcryptjs), 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