jsonwebtoken
Reasonable, with limits. 6th of 10 authentication libraries.
jsonwebtoken is Auth0's long-standing Node.js library for signing and verifying JWTs. It is installed almost everywhere, but development has nearly stopped. It only runs on Node, it is CommonJS-only, and it ships without its own types. For new work, jose does the same job better. Keep jsonwebtoken where it already runs.
Best for: Existing Node.js-only backends that already use it for simple HS256/RS256 tokens and have no edge, JWE or JWKS needs.
Scores
Overall5.2
How strongly do we recommend it for a new project today?
Claude Opus 5.5: 4.0, likely 3.0 to 5.0
It still works and is everywhere, but maintenance is minimal and it is Node-only CommonJS without bundled types. jose from the same category is faster, broader and runs on every runtime. It is a keep-where-it-runs choice, not a pick for new projects.
- pkgpulse.com/guides/jose-vs-jsonwebtoken-vs-fast-jwt-jwt-libraries-nodejs-2026: Recommends jose for new projects
- dev.to/silentwatcher_95/why-you-should-delete-jsonwebtoken-in-2025-1o7n: Gives a migration path from jsonwebtoken to jose
- github commitsLastYear: Only 5 commits in the last year
GPT-6.2 Sol: 6.3, likely 5.2 to 7.4
jsonwebtoken is a reasonable choice for a Node.js service that values synchronous JWT operations and already handles authentication elsewhere. For new token work, jose offers first-party types, broader runtime support, remote key sets, and more active maintenance. Better Auth covers sign-in and session management for teams that need the full authentication flow. The value of synchronous calls and the pace of future fixes account for most of the range.
- github.com/auth0/node-jsonwebtoken/blob/master/README.md: Documents the synchronous Node.js signing and verification API.
- github.com/panva/jose: Documents portable JWT verification, remote key sets, encryption, and zero dependencies.
- better-auth.com/docs/introduction: Better Auth provides account management, sign-in, and sessions.
- github commitsLastYear; npm latestPublishedAt; peers jose and Better Auth: jsonwebtoken has a slower recent commit and release cadence than both peers.
Needed by many5.4
How many developers need a tool for this job?
Claude Opus 5.5: 5.5, likely 4.5 to 6.5
Many backend developers need to sign or verify JWTs, but this is only the token part of the authentication job. It does not handle sign-in or sessions. It also serves only the Node runtime, which makes it narrower than jose.
- pkgpulse.com/guides/jose-vs-jsonwebtoken-vs-fast-jwt-jwt-libraries-nodejs-2026: Describes it as Node.js-only with no edge runtime support
- category.job: The category covers sign-in and sessions too; this library only handles tokens
GPT-6.2 Sol: 5.2, likely 3.9 to 6.5
JWT signing and verification are useful across Node.js APIs and services, and Node.js leads the State of JavaScript runtime survey. The package covers the token part of authentication and leaves sign-in and sessions to the application. The survey measures runtime use, so the share of developers who need this particular token API is harder to pin down.
- 2025.stateofjs.com/en-US/other-tools/#runtimes: Node.js led the runtime question with 10,062 of 11,141 respondents.
- github.com/auth0/node-jsonwebtoken/blob/master/README.md: The API covers signing, verification, and decoding.
- github.com/vercel/next.js/discussions/88724: A developer reported that switching to jose fixed JWT verification in Edge middleware.
Helps a lot5.5
How well does it do the job for those who need it?
Claude Opus 5.5: 4.0, likely 3.0 to 5.0
It signs and verifies JWS tokens correctly, with a simple API that AI agents write well. It lacks JWE, JWKS support, ESM, bundled types, edge support and some modern algorithms, and independent guides rate it slower for RS256. jose does the same job clearly better.
- dev.to/silentwatcher_95/why-you-should-delete-jsonwebtoken-in-2025-1o7n: Lists no ESM support, limited algorithms and partial TypeScript support
- pkgpulse.com/guides/jose-vs-jsonwebtoken-vs-fast-jwt-jwt-libraries-nodejs-2026: Rates RS256 as slow; recommends jose for new projects
- npm hasTypes: Ships no types of its own
GPT-6.2 Sol: 7.0, likely 5.9 to 8.1
Version 9.0.3 handles common signing algorithms and claim checks through a small API with documented error types. The examples give coding agents a clear starting point, though generated code still needs to distinguish decoding from verification and apply the application's claim policy. TypeScript needs separate declarations, and jose covers more algorithms and key handling. Benchmarks show fast verification with prepared keys, while a user report shows that string secrets can be much slower depending on the Node.js and OpenSSL versions.
- github.com/auth0/node-jsonwebtoken/blob/master/README.md: Documents synchronous and callback APIs, claim checks, and verification errors.
- raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/master/types/jsonwebtoken/index.d.ts: DefinitelyTyped supplies the TypeScript declarations separately.
- ecdsa.com/libraries/jsonwebtoken: Tests on 9.0.3 confirmed common algorithms and the absence of Ed25519 support.
- github.com/nearform/fast-jwt/blob/master/benchmarks/README.md: The fast-jwt team measured low verification overhead for prepared keys.
- github.com/auth0/node-jsonwebtoken/issues/1046: A user measured a substantial HMAC verification slowdown with string secrets.
- github.com/panva/jose: jose includes encryption and local and remote key sets.
Holds up over time4.4
Will it still be a good choice in two years?
Claude Opus 5.5: 3.5, likely 2.5 to 5.0
The repository had 5 commits and no GitHub release in the last year. The only npm release, 9.0.3, bumped jws to fix CVE-2025-65945. The Scorecard Maintained check is 0, and 76 pull requests are open. Auth0 ownership makes abandonment unlikely, but the ecosystem is moving to jose: firebase-admin has a proposal to switch, and edge runtimes need it.
- github commitsLastYear: Only 5 commits and 0 GitHub releases in the last year
- scorecard Maintained: Maintained check scores 0
- tuleap.net/plugins/tracker/?aid=45981: 9.0.3 only updates jws to fix CVE-2025-65945
- github.com/firebase/firebase-admin-node/discussions/2429: Proposal to replace jsonwebtoken with jose, because it breaks on Deno, Bun and Workers
GPT-6.2 Sol: 5.2, likely 3.9 to 6.7
Auth0 still owns the repository, and the stable API has changed little since version 9 tightened key requirements. The past year brought five commits and one npm patch, with verification fixes still waiting in open pull requests. Several accounts have published past versions and the repository has a release workflow, though the current publisher roster is unclear. That leaves more uncertainty about future fixes than with the more active jose.
- github commitsLastYear, openIssues, openPullRequests; npm versionsLastYear: Five commits, one npm publication, 142 open issues, and 76 open pull requests.
- github.com/auth0/node-jsonwebtoken/blob/master/CHANGELOG.md: The December 2025 patch updated jws. The previous patch shipped in August 2023.
- github.com/auth0/node-jsonwebtoken/pulls: Several verification and error-handling changes are awaiting merge.
- socket.dev/npm/package/jsonwebtoken/versions: The npm publication history lists three distinct publishers across the 9.x releases.
- github.com/auth0/node-jsonwebtoken/blob/master/.github/workflows/release.yml: The current repository has an automated release workflow.
- peers jose commitsLastYear and latestPublishedAt: jose recorded 291 commits and published on November 18, 2026.
Used widely8.0
How many use it, and is that growing?
Claude Opus 5.5: 8.0, likely 7.0 to 9.0
It has about 328M downloads in 4 weeks and 719k dependent repositories, the most in the category by dependents. Its growth ratio of 3.25 is below the 4.1 median, so it is losing ground, mostly to jose. Much of the use comes from old codebases and transitive installs.
- npm downloadsLast4Weeks: 328M now, against 101M a year ago (ratio 3.25, below the median of 4.1)
- dependents repos: 718,942 repositories, far ahead of Passport's 264k and jose's 55k
- peers jose downloadsLast4Weeks: jose grew about 10x in the same period
GPT-6.2 Sol: 7.9, likely 6.7 to 9.0
Ecosyste.ms found about 719,000 dependent repositories and 22,000 dependent packages, the largest reported repository count among the supplied peers. Four-week downloads grew 3.25 times, below the 4.1 times catalog baseline and jose's 10.3 times growth, which suggests a loss of relative ground. Automated installs and packages such as NestJS inflate download totals, so those figures leave considerable uncertainty about how often new projects choose it directly.
- dependents repos and packages; peers dependentRepos: 718,942 observed repositories and 21,931 packages, with the highest known peer repository count.
- npm downloadsLast4Weeks and downloadsSame4WeeksYearAgo; medianDownloadsRatio: 328.4 million versus 101.0 million, or 3.25 times against a 4.1 times baseline.
- peers jose downloadsLast4Weeks and downloadsSame4WeeksYearAgo: jose grew 10.3 times, with many installs coming through other packages.
- github stars; bluesky posts; hackerNews stories: 18,186 stars and no matches in the supplied social counts.
- github.com/nestjs/jwt/blob/master/package.json: Installing the NestJS JWT module also installs jsonwebtoken.
Vouched for6.5
Who stands behind it being good?
Claude Opus 5.5: 5.5, likely 4.5 to 7.0
Auth0 backs it, and huge numbers of production apps and packages depend on it. Current independent comparisons recommend jose instead for new projects, and there is no current survey praise or Bluesky or Hacker News attention. Most of its validation comes from history.
- pkgpulse.com/guides/jose-vs-jsonwebtoken-vs-fast-jwt-jwt-libraries-nodejs-2026: Calls it a legacy choice for existing Node apps
- bluesky posts: 0 posts and 0 Hacker News stories
- github stars: 18k stars, which reflect history more than current choice
GPT-6.2 Sol: 7.5, likely 6.4 to 8.6
NestJS ships it in its JWT module, and Strapi uses it in its user permissions plugin. Independent tests on 9.0.3 confirmed expected behavior for several common signing algorithms. These sources establish confidence in its Node.js token work, while evidence about developer satisfaction and newer deployments remains sparse.
- github.com/nestjs/jwt/releases: A published NestJS JWT module release upgraded to jsonwebtoken 9.0.3.
- github.com/strapi/strapi/blob/develop/packages/plugins/users-permissions/server/src/services/jwt.js: Strapi uses jsonwebtoken to sign and verify user tokens.
- ecdsa.com/libraries/jsonwebtoken: Independent tests checked supported algorithms and verification behavior on 9.0.3.
- github.com/nearform/fast-jwt/blob/master/benchmarks/README.md: A competing project's benchmark gives workload-specific performance evidence.
Safe6.3
How safe is it to depend on?
Claude Opus 5.5: 6.0, likely 5.0 to 7.0
All four advisories are old and fixed. Version 9 removed the insecure algorithm and key defaults, and 9.0.3 patched the jws dependency the same day the jws CVE was published. The Scorecard is 5.7, with weak token permissions, no SAST and no fuzzing, and the package pulls in 10 dependencies where jose has none. The licence is MIT.
- advisories: 4 total, none in the last 24 months; 2022 defaults fixed in v9
- scorecard score: 5.7, with Token-Permissions, SAST and Fuzzing at 0
- npm dependencies: 10 runtime dependencies
- scout.docker.com/vulnerabilities/id/CVE-2025-65945: jws CVE; jsonwebtoken's verify path is not affected
GPT-6.2 Sol: 6.5, likely 5.3 to 7.7
The MIT-licensed 9.0.3 release includes fixes for the listed older advisories, and the bundle records no direct advisories in the last 24 months. Version 9.0.0 shipped alongside the 2022 disclosures, and 9.0.3 picked up the jws patch on its disclosure day. Ten runtime dependencies and a 5.7 OpenSSF Scorecard leave room for concern, especially around workflow token permissions and dependency pinning. The current release workflow requests npm provenance, while the provenance of the published 9.0.3 artifact remains unverified.
- npm license and dependencies; advisories last24Months: MIT license, ten direct runtime dependencies, and zero recent direct advisories.
- scorecard score and checks: 5.7 overall, with token permissions at 0 and dependency pinning at 4.
- github.com/auth0/node-jsonwebtoken/blob/master/CHANGELOG.md: Records the earlier fixes, version 9 hardening, and the jws update.
- github.com/advisories/GHSA-c7hr-j4mj-j2w6: The oldest listed verification issue was patched in 4.2.2.
- github.com/advisories/GHSA-869p-cjfg-cm3x: The jws advisory excluded the interface jsonwebtoken uses.
- github.com/auth0/node-jsonwebtoken/blob/master/.github/workflows/release.yml: The current workflow requests npm provenance and uses pinned action revisions.
Good
- The sign/verify API is very simple, and almost every tutorial and AI agent knows it.
- No JWT package has more use: about 719k dependent repositories and very many Stack Overflow answers.
- Version 9 fixed the insecure defaults of the 2022 advisories, and it has no new advisories in the last 24 months.
- It is backed by Auth0/Okta and MIT licensed.
Bad
- It is Node-only: it fails on Cloudflare Workers, Vercel Edge, Deno and in the browser, because it needs node:crypto.
- It is CommonJS with a callback-style API. Types come only from @types/jsonwebtoken.
- It has no JWE, no JWKS fetching and only limited support for newer algorithms such as EdDSA. jose covers all of these.
- Maintenance is minimal: 5 commits and one dependency-bump release in a year, and 76 pull requests left open.
The numbers
- npm downloads, 4 weeks
- 328M ×3.3 in a year
- GitHub stars
- 18k
- Commits, 12 months
- 5
- npm version
- 9.0.3 Dec 2025
- Versions, 12 months
- 1
- Advisories, 24 months
- 0 of 4 ever
- OpenSSF Scorecard
- 5.7 out of 10, Nov 2026
- Licence
- MIT
Read on 21 November 2026 from GitHub (auth0/node-jsonwebtoken), npm (jsonwebtoken), OSV and the OpenSSF Scorecard.
Authentication libraries
- 8.5Better Auth
- 8.3jose
- 7.9openid-client
- 6.8iron-session
- 6.3SuperTokens
- 5.2jsonwebtoken
- 4.9Passport
- 4.0Auth.js
- 1.6Arctic
- 1.6Lucia