jose

Zero-dependency JWT, JWS, JWE, and JWK toolkit for Node.js, browsers, and edge runtimes.

Library
npm
v6.2.12
7,812 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
88 /100 Excellent
Development Activity 96
Maintenance 100
Community 56
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
90 /100 Excellent
Architecture 92
Code Quality 90
Innovation 88
Learning Curve 85

jose is a JavaScript library for JSON Object Signing and Encryption (JOSE) — the umbrella of specs behind JSON Web Tokens (JWT), JSON Web Signatures (JWS), JSON Web Encryption (JWE), and JSON Web Keys (JWK/JWKS). It implements the full RFC 751x family plus newer additions like ML-DSA for JOSE, all on top of the standard Web Crypto API rather than a bespoke crypto implementation.

The library ships as a single ESM package with zero runtime dependencies and is built to run identically across Node.js, browsers, Deno, Bun, Cloudflare Workers, and Electron. It exposes both a low-level, spec-faithful API (Compact/Flattened/General JWS and JWE) and higher-level convenience classes like SignJWT and EncryptJWT for the common JWT case, along with remote and local JWKS helpers for key rotation.

What You Get

  • Full JWS support (Compact, Flattened, General serialization) for signing and verifying arbitrary payloads
  • Full JWE support (Compact, Flattened, General serialization) for encrypting and decrypting arbitrary payloads
  • SignJWT and EncryptJWT fluent builder classes plus jwtVerify/jwtDecrypt for the common JWT workflow
  • Local and remote JWKS helpers (createLocalJWKSet, createRemoteJWKSet) with built-in caching for key rotation
  • Key import/export/generation utilities for PEM (SPKI, PKCS#8, X.509), JWK, and raw secrets

Common Use Cases

  • Issuing and verifying signed JWTs for API authentication and session tokens
  • Encrypting sensitive claims in JWE-based tokens instead of relying on TLS alone
  • Verifying tokens against a provider’s remote JWKS endpoint (OAuth/OIDC identity providers)
  • Running crypto-heavy auth logic inside edge runtimes like Cloudflare Workers where Node’s crypto module isn’t available

Under The Hood

Architecture jose is organized around the JOSE spec family, with parallel module trees for JWS (src/jws/{compact,flattened,general}), JWE (src/jwe/{compact,flattened,general}), JWK (src/jwk/{embedded,thumbprint}), JWKS (src/jwks/{local,remote}), and a higher-level JWT layer (src/jwt/{sign,verify,encrypt,decrypt,unsecured}) that composes the JWS/JWE primitives with claims-set validation (src/lib/jwt_claims_set.ts). All cryptographic operations funnel through a shared internal lib/ layer (crypto_key.ts, key_management.ts, signing.ts, content_encryption.ts, ecdhes.ts, aeskw.ts, rsaes.ts, pbes2kw.ts) that normalizes keys and dispatches to the Web Crypto API’s SubtleCrypto interface rather than any bespoke crypto code, which is what lets the same source run unmodified in Node, browsers, Deno, Bun, and Workers. The public surface in src/index.ts re-exports every operation individually, and the package.json exports map exposes dozens of matching subpaths (jose/jwt/sign, jose/jwks/remote, etc.) so each algorithm/format only pulls in the code it needs.

Tech Stack Written in strict TypeScript with zero runtime dependencies (an empty “dependencies” field in package.json backs the README’s explicit “Dependencies: 0” claim). The build pipeline uses tsc for type declarations and esbuild for bundled/minified/UMD builds, with a separate build:deno target that transforms the same source into Deno-compatible imports. Package output is ESM-only (type: module) targeting es2022. Devtooling includes ava for unit tests, Playwright for browser tests, and typedoc (with typedoc-plugin-markdown) to generate the docs/ reference straight from JSDoc.

Code Quality The repo separates unit tests (test/, using ava, 36 files spanning jws/jwe/jwk/jwks/jwt/util) from cross-runtime conformance tests (tap/, with dedicated scripts to run the suite under Node, Bun, Deno, Electron, Workerd, and real browsers via Playwright) — a notably rigorous setup for a library that has to behave identically across five-plus runtimes. Source files are small and single-purpose (e.g. src/jwt/sign.ts at 198 lines, src/lib/crypto_key.ts at 140 lines), each carrying extensive JSDoc with runnable examples that also feed the generated docs.

API Design The library pairs a low-level, spec-literal API (CompactSign, FlattenedEncrypt, GeneralVerify, etc., mirroring the JWS/JWE serialization names from the RFCs) with high-level convenience classes (SignJWT, EncryptJWT) that use a fluent, chainable builder pattern (.setIssuer().setAudience().setExpirationTime().sign(key)) for the common JWT case — letting newcomers use the friendly builder while power users can drop to the primitives. Naming is consistent across the JWS/JWE/JWK/JWT modules, and every exported function/class has a corresponding docs/ page and JSDoc example, keeping the boilerplate needed to get started low despite the library’s broad spec coverage.

Used by 66 apps in this directory

TypeScript
82%
Other

AFFiNE

Collaboration · Note Taking · Productivity

73,040

Write, draw, and plan in one infinite canvas — the open-source alternative to Notion and Miro that keeps your data yours.

View details
91
Repo Health
87
Technical
67
Dependency
Built with
TypeScript 82%
Rust 11%
Updated 5 days ago
TypeScript
100%
Apache 2.0

agentic-inbox

AI Agents · Mcp · Productivity

8,118

A self-hosted email client with an AI agent that reads your inbox, drafts replies automatically, and exposes full email operations over MCP — running entirely on Cloudflare Workers.

View details
31
Repo Health
74
Technical
77
Dependency
Built with
TypeScript 100%
Updated 5 months ago
TypeScript
54%
MIT

Anarlog

AI Assistants · Note Taking · Productivity

9,404

Anarlog is an open-source, local-first AI meeting notetaker that records, transcribes, and summarizes meetings entirely on your device — no cloud lock-in, no mandatory account, and every note saved as a plain markdown file you own forever.

View details
86
Repo Health
77
Technical
68
Dependency
Built with
TypeScript 54%
Rust 34%
Updated 4 days ago
TypeScript
97%
AGPL 3.0

Bigcapital

Invoicing Finance

3,916

Self-hostable double-entry accounting platform with invoicing, inventory, multi-currency, and real-time financial reporting for small and medium businesses.

View details
90
Repo Health
77
Technical
61
Dependency
Built with
TypeScript 97%
Updated 6 days ago
TypeScript
100%
MIT

Botpress

AI Assistants · AI Development · Customer Support

14,924

The open-source hub for building and deploying LLM-powered AI agents with TypeScript-first tooling, 40+ integrations, and a revolutionary code-execution agent framework.

View details
94
Repo Health
82
Technical
64
Dependency
Built with
TypeScript 100%
Updated 1 weeks ago
TypeScript
45%
AGPL 3.0

BrowserOS

AI Assistants · Browser

13,763

The open-source agentic Chromium browser with native AI agents, MCP server, and visual workflow automation — your data never leaves your machine.

View details
87
Repo Health
82
Technical
68
Dependency
Built with
TypeScript 45%
Rust 23%
Python 18%
Updated 4 days ago
TypeScript
96%
Other

Cal.diy

Scheduling

48,697

The 100% MIT-licensed, community-driven scheduling platform — self-host your own booking infrastructure with no enterprise strings attached.

View details
91
Repo Health
86
Technical
65
Dependency
Built with
TypeScript 96%
Updated 6 days ago
Rust
54%
Other

Cap

Team Chat · Video Conferencing

22,884

Open source Loom alternative with GPU-accelerated recording, instant share links, AI summaries, and full self-hosting via Docker Compose.

View details
89
Repo Health
81
Technical
64
Dependency
Built with
Rust 54%
TypeScript 42%
Updated 4 days ago
TypeScript
45%
Other

Convex Backend

Databases · Developer Tools

12,617

Open-source reactive database that lets developers build live-updating apps with pure TypeScript, strong consistency, and real-time subscriptions—no separate API layer required.

View details
87
Repo Health
82
Technical
68
Dependency
Built with
TypeScript 45%
Rust 43%
Updated 6 days ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers