Elestia Open Source Ratings
7.4

libsodium.js

A strong pick. 4th of 10 cryptography and password hashing.

libsodium.js is the well-known libsodium C library compiled to WebAssembly, with JavaScript wrappers. It gives one API for authenticated encryption, signatures, key exchange and password hashing in browsers, Node.js and Bun. It is a strong, actively maintained choice when you want libsodium's full, misuse-resistant toolkit. The trade-offs are a large bundle, async setup, and password hashing that only the sumo build includes.

Best for: Teams that want libsodium's complete, audited primitives (secretbox, box, sign, secretstream, Argon2) with the same API in browsers and on servers.

GitHubnpm

Scores

Overall7.4

How strongly do we recommend it for a new project today?

Claude Opus 5.5: 7.0, likely 6.0 to 7.5

It is a strong pick when you need libsodium's full toolkit in JavaScript, especially across browser and server. It is actively maintained and has a clean security record. Noble packages suit most new projects better when they need only a few primitives and want a small, synchronous, tree-shakeable bundle. node-argon2 or bcrypt is simpler for server-side password hashing alone. The large bundle and the sumo-only Argon2 keep it below the top tier.

GPT-6.2 Sol: 7.8, likely 6.6 to 8.7

Choose libsodium.js for a new project that needs Sodium-compatible encryption and signing across browsers and servers. For a Node.js service whose only requirement is password storage, node-argon2 offers a simpler hash and verify API. Ongoing development supports the recommendation, while the browser payload, concentration of releases under one signer, and limited evidence on current-build performance keep the range wide.

Needed by many5.2

How many developers need a tool for this job?

Claude Opus 5.5: 5.0, likely 4.0 to 6.0

Encryption, signing and password hashing are needed in many apps, but most web developers reach for platform crypto or bcrypt/argon2 for one task. libsodium.js serves the narrower group that needs a general crypto toolkit, especially one that also runs in the browser. Password hashing in the standard package is missing, which narrows it a little.

  • github.com/jedisct1/libsodium.js: Browser, Node and Bun. crypto_pwhash only in sumo.
  • dependents: 6,558 repos, similar to node-argon2 and far below bcrypt or TweetNaCl.

GPT-6.2 Sol: 5.4, likely 4.1 to 6.6

Password storage, signing, and encryption matter to many applications, and the wrappers work across browsers and servers. Built-in crypto covers common operations, so a separate Sodium dependency mainly serves teams that need its algorithms or formats. Browser measurements give some context, but they leave server-side demand and the share of developers who need Sodium uncertain.

Helps a lot7.6

How well does it do the job for those who need it?

Claude Opus 5.5: 7.0, likely 6.0 to 8.0

The API is the most complete in the category, and it is built on libsodium's misuse-resistant design and constant-time helpers. Version 0.8 added generated TypeScript types and ESM. Limits keep the score from going higher: a large WASM bundle, the async ready step, functions that are not named exports, slower symmetric encryption than WebCrypto in CryptPad's benchmarks, and Argon2 only in sumo. Several 0.8 regressions came out in early 2026 and were fixed quickly.

GPT-6.2 Sol: 8.1, likely 6.9 to 9.0

Version 0.8.4 covers authenticated encryption, streaming, signing, and Argon2id through sumo. Bundled types and examples help callers choose the right methods, though they still need to await initialization and select the right build. CryptPad’s older browser tests found competitive public-key encryption and faster native Web Crypto on several other operations. Current performance across runtimes and coding-agent accuracy remain uncertain.

Holds up over time7.1

Will it still be a good choice in two years?

Claude Opus 5.5: 7.0, likely 6.0 to 8.0

The project is very active, with 155 commits and 6 releases last year and zero open issues or pull requests. It follows the upstream libsodium closely, and that maintainer has kept it going for more than ten years. The risks are that the work rests largely on one maintainer, and the 0.7 to 0.8 move caused some churn.

  • github commitsLastYear: 155 commits and 6 releases last year.
  • github openIssues: 0 open issues and 0 open PRs, 283 issues closed.
  • Frank Denis maintains libsodium: One long-time maintainer for both the C library and the JS port.

GPT-6.2 Sol: 7.1, likely 5.7 to 8.4

The repository recorded 155 commits and six releases in a year, with commits continuing into October after the April release. One person signed the recent releases, and the public record gives little evidence of backup release ownership or sustained funding. A downstream Next.js user reported a broken sumo import in 0.7.16 and found that upgrading to 0.8.0 restored the build.

Used widely5.1

How many use it, and is that growing?

Claude Opus 5.5: 5.5, likely 4.5 to 6.5

Downloads were 29.8M in the last 4 weeks, against 5.2M a year ago. That ratio of 5.7 is above the 4.1 median, so the project is gaining ground. Many of the installs are likely transitive, through SDKs that encrypt secrets or handle voice and blockchain work. Its 6,558 dependent repos match node-argon2 but are well below noble, TweetNaCl and bcrypt.

  • npm downloadsLast4Weeks: 29.8M now vs 5.2M a year ago, ratio about 5.7.
  • dependents: 6,558 repos and 489 packages.
  • bluesky posts: 0 posts and 0 HN stories, so little direct attention.

GPT-6.2 Sol: 4.6, likely 3.5 to 5.8

Four-week downloads rose from 5.21 million to 29.83 million, about 5.7× against the 4.1× catalog baseline. The 6,558 tracked dependent repositories and 489 packages put the standard wrapper close to node-argon2 and hash-wasm and far behind TweetNaCl.js and Forge. Repeat and transitive installs inflate downloads, and the tracked counts leave out separate sumo and script-tag use.

  • npm downloadsLast4Weeks, npm downloadsSame4WeeksYearAgo, medianDownloadsRatio: 5.7× year-over-year download growth against a 4.1× baseline.
  • dependents, peers dependentRepos: 6,558 tracked repositories and 489 packages, near node-argon2 and hash-wasm.
  • github.com/jedisct1/libsodium.js/blob/0.8.4/README.md: Documents separate sumo packages and standalone browser scripts.
Vouched for6.4

Who stands behind it being good?

Claude Opus 5.5: 6.0, likely 4.5 to 7.0

libsodium itself is an industry standard. The JS port had a 2017 audit, paid for by Private Internet Access. Independent reviews such as CryptPad's treat it as a serious option, and many SDKs build on it. There are few current, independent write-ups or survey numbers specific to the JS wrapper, and the audit is old.

GPT-6.2 Sol: 6.7, likely 5.3 to 7.9

Microsoft’s VS Code remote package declares the current wrapper, and discord.js Voice documents it as an optional encryption provider. Least Authority recommended the WebAssembly build in a 2021 wallet review, and CryptPad published mixed browser benchmarks in 2023. Those evaluations predate 0.8.4, which limits how much they say about the current build.

Safe6.9

How safe is it to depend on?

Claude Opus 5.5: 7.0, likely 6.0 to 8.0

It has no known advisories, only one dependency (its own libsodium core), and an ISC licence. The Scorecard is 4.5: it has no code review, no branch protection, no security policy and unpinned dependencies, and one person does the releases. The WASM build comes from heavily scrutinised C code, which lowers the risk of the cryptography itself.

  • advisories total: 0 advisories.
  • scorecard score: 4.5, with Code-Review 1 and Branch-Protection, Security-Policy and Pinned-Dependencies all 0.
  • npm dependencies: 1 dependency, ISC licence.

GPT-6.2 Sol: 6.7, likely 5.3 to 7.9

The wrapper has a permissive ISC license and one runtime dependency, and the supplied OSV snapshot lists zero wrapper advisories. The 0.8 release line incorporated upstream security fixes, and GitHub verifies the 0.8.4 source tag. Scorecard rates the repository 4.5 out of 10, with weak code review, branch protection, and dependency pinning. The tagged release script publishes directly with npm or Yarn, leaving build provenance uncertain.

Good

  • It covers far more than TweetNaCl: XChaCha20 secretstream, KDFs, generic hashing and (in sumo) Argon2id, all under one API.
  • It is built from libsodium itself, a widely trusted C library, and stays current with upstream (1.0.22 in 0.8.3).
  • Since 0.8.1 it ships its own TypeScript types and ESM builds, so @types/libsodium-wrappers is no longer needed.
  • It has a single runtime dependency, no known advisories, and an issue tracker with nothing left open.

Bad

  • The bundle is large, at about 290 KB gzipped for the standard build and 375 KB for sumo, compared with a few KB for noble or TweetNaCl.
  • crypto_pwhash (Argon2) exists only in the sumo build, so the standard libsodium-wrappers package cannot hash passwords.
  • You must await sodium.ready before any call, and crypto functions are not named ESM exports, which trips up bundlers and AI-written code.
  • The move to 0.8 brought several ESM, packaging and performance regressions, and one person does nearly all of the releases.

The numbers

npm downloads, 4 weeks
30M ×5.7 in a year
GitHub stars
1.2k
Commits, 12 months
155
npm version
0.8.4 Apr 2026
Versions, 12 months
6
Advisories, 24 months
0 of 0 ever
OpenSSF Scorecard
4.5 out of 10, Nov 2026
Licence
ISC

Read on 21 November 2026 from GitHub (jedisct1/libsodium.js), npm (libsodium-wrappers), OSV and the OpenSSF Scorecard.

Cryptography and password hashing

  1. 8.2noble-curves
  2. 8.1noble-hashes
  3. 7.8node-argon2
  4. 7.4libsodium.js
  5. 6.5hash-wasm
  6. 6.2bcrypt.js
  7. 5.4node.bcrypt.js
  8. 4.9Forge
  9. 4.5TweetNaCl.js
  10. 1.7crypto-js
Compare all 10 on six scores