node-argon2
A strong pick. 3rd of 10 cryptography and password hashing.
node-argon2 is the main Node.js binding for Argon2id, which OWASP lists first for password storage. For a new Node.js project that stores passwords it is a strong pick. It only hashes passwords, and Node's built-in crypto.argon2 may one day turn it into a thin wrapper.
Best for: Node.js backends that store user passwords and want Argon2id with safe defaults and a simple hash/verify API.
Scores
Overall7.8
How strongly do we recommend it for a new project today?
Claude Opus 5.5: 7.5, likely 6.5 to 8.5
For password hashing on Node it is the most direct way to use the algorithm OWASP prefers, and it is well kept and safe. It is narrower than the general crypto libraries, has fewer users than bcrypt, and rests on one maintainer. Node's native crypto.argon2 is a real alternative on Node 24.7+.
- cheatsheetseries.owasp.org/cheatsheets/Password_Storage_Cheat_Sheet.html: Argon2id is the preferred algorithm
- github.com/ranisalt/node-argon2/issues/469: Future as a wrapper over native Node argon2
- npm downloads ratio: About 7x a year ago, above the 4.1 median
GPT-6.2 Sol: 8.1, likely 6.9 to 9.0
For a new Node.js app that stores passwords, node-argon2 is a stronger default than the bcrypt peers because it pairs Argon2id with a complete password verification workflow. Its API also handles stored hash formatting and rehash checks that Node's built-in Argon2 leaves to the caller. Native deployment friction, uneven release safeguards, and the transition to the built-in implementation keep it below a category-wide default.
- cheatsheetseries.owasp.org/cheatsheets/Password_Storage_Cheat_Sheet.html: OWASP recommends Argon2id for new password storage and treats bcrypt as a legacy option.
- nodejs.org/api/crypto.html#cryptoargon2algorithm-parameters-callback: Node's built-in API returns raw derived bytes and leaves hash storage and verification to the caller.
- github.com/ranisalt/node-argon2/issues/469: The roadmap keeps the password API while moving the underlying computation to Node.
- evidence.github.releasesLastYear, evidence.scorecard: Active release work coexists with gaps in supply-chain safeguards.
Needed by many4.5
How many developers need a tool for this job?
Claude Opus 5.5: 5.0, likely 4.0 to 6.0
Many backend apps that run their own login need password hashing, but many others hand auth to a provider. This package covers only password hashing on Node-compatible servers, not signing or encryption. That makes it narrower than its category.
- github description: Node.js bindings for the Argon2 algorithm only
- pkgpulse.com/guides/bcrypt-vs-argon2-vs-scrypt-password-hashing-2026: Native C++ bindings for server-side password hashing
GPT-6.2 Sol: 3.9, likely 2.8 to 5.1
Node.js is widely used, and password hashing matters for backends that store their own credentials. This package covers that slice of the category. Frontend code, apps that delegate authentication, and teams looking for signing or encryption have little reason to use it, and surveys give no direct estimate of how many teams store passwords themselves.
- survey.stackoverflow.co/2026/technology/data: 46.4% of respondents to the web technologies question reported using Node.js.
- github.com/ranisalt/node-argon2: The documented API focuses on Argon2 hashing and verification in Node.js.
Helps a lot8.3
How well does it do the job for those who need it?
Claude Opus 5.5: 8.0, likely 7.0 to 9.0
It wraps the reference Argon2 C code and offers Argon2id by default, PHC strings, needsRehash and good defaults. It is fast for a password hash, has bundled types, and AI agents write correct code for its small API. Native build gaps on some platforms and a few type regressions in minor releases keep it short of a 9.
- github.com/ranisalt/node-argon2/releases: Prebuilds for all platforms; fixes for types and PHC parameter order
- github.com/ranisalt/node-argon2/issues?q=is%3Aissue: Recurring 'No native build was found' and type regression reports, all closed
- cheatsheetseries.owasp.org/cheatsheets/Password_Storage_Cheat_Sheet.html: OWASP lists Argon2id first
- npm hasTypes: Ships its own types
GPT-6.2 Sol: 8.5, likely 7.3 to 9.4
The reference C implementation sits behind a small, documented, typed API for hashing, verification, and rehash checks. Automatic salts and encoded hash strings make the usual flow easy to write correctly. Version 0.45.2 fixed a parameter-order bug that users reported broke PHP verification. Native deployment can take extra work, and the available benchmarks cover too few workloads for a firm speed ranking.
- github.com/ranisalt/node-argon2/blob/v0.45.2/argon2.cjs: Shows automatic salt generation, hash formatting, verification, and which fields needsRehash compares.
- github.com/ranisalt/node-argon2/pull/562: A downstream user reported that PHP rejected hashes from earlier 0.45 releases.
- github.com/ranisalt/node-argon2/releases/tag/v0.45.2: The current release restores standard parameter order in encoded hashes.
- native.amigo-labs.dev/packages/argon2: A competing project's low-cost benchmark puts node-argon2 ahead of hash-wasm and behind its own implementation.
- github.com/vercel/next.js/discussions/65978: Users describe native binary loading problems in earlier deployments.
Holds up over time7.1
Will it still be a good choice in two years?
Claude Opus 5.5: 7.0, likely 5.5 to 8.0
It is maintained steadily: 51 commits and 3 releases last year, and only 3 open issues. Most of the work rests on one maintainer, and the project is still pre-1.0. The plan is to become a thin wrapper over Node's native crypto.argon2, which keeps existing code working but makes the package matter less.
- github commitsLastYear: 51 commits, 3 releases, latest on 2026-11-02
- github openIssues: 3 open against 252 closed
- github.com/ranisalt/node-argon2/issues/469: Maintainer plans a thin wrapper over node:crypto argon2 and a v1
- mohhh-ok.github.io/blog/posts/2025/10-09-securityargon2がnodeで標準装備: Node 24.7 added a built-in argon2
GPT-6.2 Sol: 7.1, likely 5.8 to 8.4
The project shipped three releases and made 51 commits in the past year, more activity than either bcrypt peer. Visible releases center on one maintainer, and public funding is modest. A published v1 alpha already wraps Node's built-in Argon2, giving the password API a path forward. The range reflects uncertainty around the stable transition and how many people can share release responsibility.
- evidence.github.commitsLastYear, evidence.github.releasesLastYear, peers: 51 commits and three releases, compared with six commits for node.bcrypt.js and zero for bcrypt.js.
- github.com/ranisalt/node-argon2/releases: Recent release history shows regular fixes and a recurring release owner.
- opencollective.com/node-argon2: The public ledger shows modest financial backing.
- github.com/ranisalt/node-argon2/pull/540: The v1 alpha uses Node's built-in Argon2, with v0 support planned through Node 22's end of life.
Used widely5.9
How many use it, and is that growing?
Claude Opus 5.5: 6.0, likely 5.0 to 7.0
Downloads went from 2.0M to 14.4M per 4 weeks, a ratio of about 7. That is well above the 4.1 median, so it is gaining ground. Still, it has 6,238 dependent repos against about 290k for bcrypt and bcryptjs, so far fewer projects choose it than bcrypt.
- npm downloadsLast4Weeks: 14.4M, up from 2.0M a year ago
- dependents: 6,238 repos and 381 packages
- peers dependentRepos: bcrypt has 286k and bcryptjs 302k dependent repos
GPT-6.2 Sol: 5.7, likely 4.6 to 6.8
The collector found 6,238 dependent repositories and 381 dependent packages, close to hash-wasm on repository use and far below either bcrypt peer. Four-week downloads rose from 2.0 million to 14.4 million, about 7.1 times the prior year against the catalog median of 4.1. That points to growing reach, while automated installs, downstream dependencies, and incomplete repository coverage leave direct adoption uncertain.
- evidence.dependents, peers: 6,238 tracked repositories versus 7,629 for hash-wasm and more than 286,000 for each bcrypt peer.
- evidence.npm.downloadsLast4Weeks, evidence.npm.downloadsSame4WeeksYearAgo, medianDownloadsRatio: Install growth was 7.06 times year over year versus the catalog median of 4.1.
- evidence.github.stars, evidence.hackerNews, evidence.bluesky: 2,195 stars, no matched Hacker News stories, and a sole Bluesky result dated outside the stated window.
Vouched for6.8
Who stands behind it being good?
Claude Opus 5.5: 6.0, likely 5.0 to 7.0
OWASP recommends the Argon2id algorithm, and independent 2026 guides name this package as the default Argon2 choice for Node. There is little direct evidence of named production users or survey data for the package itself. It also gets almost no attention on HN or Bluesky.
- cheatsheetseries.owasp.org/cheatsheets/Password_Storage_Cheat_Sheet.html: Argon2id is recommended first
- pkgpulse.com/guides/bcrypt-vs-argon2-vs-scrypt-password-hashing-2026: Recommends the argon2 package for new projects
- mojoauth.com/security-guides/argon2-in-nodejs: Third-party guide that uses this package
- hackerNews stories: 0 stories, and 1 old Bluesky post
GPT-6.2 Sol: 7.5, likely 6.3 to 8.6
Directus uses the package in its server code, and AdonisJS documents and recommends it as an option for new apps. OWASP endorses the Argon2id algorithm, which is the package default. Package-specific satisfaction data is sparse, and the comparative performance evidence comes from a competing library's limited benchmark.
- github.com/directus/directus/blob/main/api/src/utils/generate-hash.ts: The Directus server imports the npm package for its hashing helper.
- docs.adonisjs.com/guides/security/hashing: AdonisJS integrates the package through its Argon2 driver and recommends Argon2 for new apps.
- cheatsheetseries.owasp.org/cheatsheets/Password_Storage_Cheat_Sheet.html: OWASP recommends Argon2id for password storage.
- native.amigo-labs.dev/packages/argon2: A comparative benchmark gives a limited cross-check of hashing speed.
Safe7.1
How safe is it to depend on?
Claude Opus 5.5: 7.5, likely 6.5 to 8.5
It has no advisories in OSV and only 4 dependencies, and releases are published with npm provenance under an MIT licence. Against that, the Scorecard is only 5, with no code review, no security policy and no fuzzing. Native C code and prebuilt binaries also add some supply-chain surface.
- advisories total: 0 advisories
- scorecard: 5/10; Code-Review, Security-Policy, Token-Permissions and Fuzzing score 0
- npm dependencies: 4 dependencies
- github.com/ranisalt/node-argon2/releases: Provenance added in v0.41.1; work on reproducible builds
GPT-6.2 Sol: 6.6, likely 5.4 to 7.8
The package has an MIT license, four direct dependencies, and zero advisories in the OSV snapshot. GitHub Actions builds the native binaries and stages npm releases with provenance. The native install script adds exposure, and the 5 out of 10 Scorecard flags code review, token permissions, and fuzzing. The lack of a published security policy and limited visibility into release access keep the range wide.
- evidence.advisories, evidence.npm.dependencies, evidence.npm.license: Zero recorded advisories, four direct dependencies, and a permissive MIT license.
- evidence.scorecard: Overall score of 5, with zeros for code review, token permissions, fuzzing, and security policy.
- github.com/ranisalt/node-argon2/blob/v0.45.2/.github/workflows/release.yml: The workflow packages CI-built binaries and uses staged npm publishing with provenance.
- github.com/ranisalt/node-argon2/blob/v0.45.2/package.json: The stable package bundles native binaries and declares a native install script.
- github.com/ranisalt/node-argon2/security: GitHub lists no security policy or published repository advisories.
Good
- It has a simple async hash() and verify() API that writes PHC strings and uses defaults in line with RFC 9106 and OWASP.
- It ships prebuilt binaries for many platforms, including musl, ARM and FreeBSD, so most installs need no compiler.
- It has no known advisories, few dependencies, an MIT licence and npm provenance on its releases.
- It ships TypeScript types and is widely recommended as the default Argon2 package for Node.
Bad
- It is a native addon, so it does not run in browsers or edge runtimes, and some platforms still hit 'No native build was found' errors.
- It only hashes passwords; signing and encryption need another library.
- One maintainer does most of the work, and type regressions slipped into recent minor releases.
- It is still pre-1.0, and Node 24.7+ now has crypto.argon2 built in, which reduces the need for this package over time.
The numbers
- npm downloads, 4 weeks
- 14M ×7.1 in a year
- GitHub stars
- 2.2k
- Commits, 12 months
- 51
- npm version
- 0.45.2 Nov 2026
- Versions, 12 months
- 3
- Advisories, 24 months
- 0 of 0 ever
- OpenSSF Scorecard
- 5.0 out of 10, Oct 2026
- Licence
- MIT
Read on 21 November 2026 from GitHub (ranisalt/node-argon2), npm (argon2), 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