Esc
  • Jump to
  • The board
  • All launchesSort and filter by week or category
  • Open statsEvery number, in public
  • Maker storiesApps that stopped hiding
  • Submit a launch
  • AICategory
  • AnalyticsCategory
  • API & BackendCategory
  • Audio & VoiceCategory
  • AutomationCategory
  • CommunityCategory
↑↓ to move↵ to openPress / anywhere
Sign in

What is JSON Web Token (JWT)?

A compact, URL-safe token standard (RFC 7519) that encodes JSON claims between two parties and protects them with a digital signature or encryption.

Updated · Building

Plain definition

Definition of JSON Web Token (JWT)

A compact, URL-safe token standard (RFC 7519) that encodes JSON claims between two parties and protects them with a digital signature or encryption.

Formula / syntaxCompact JWS = Base64url(Header) + "." + Base64url(Payload Claims) + "." + Base64url(Signature)

Worked example

Imagine a made-up webhook testing workbench called TraceBin at `https://tracebin.example`. After a user signs in, the auth service issues a short-lived signed JWT (JWS) with `alg: "RS256"` in its header and JSON claims in its payload: `{"sub": "usr_914", "org": "org_22", "iss": "https://auth.tracebin.example", "aud": "tracebin-api", "iat": 1795699200, "exp": 1795700100}`. Because `exp` is 15 minutes (900 seconds) after `iat`, any microservice or edge gateway holding the public JWKS key can verify the signature locally without querying the central user table on every API call.

Crucially, TraceBin never places Stripe keys, internal email notes, or sensitive PII inside those claims, because standard JWS segments are Base64url-encoded JSON rather than encrypted (JWE). Any browser script or network proxy holding the token can decode the middle segment instantly. When a team revokes a member's access, the 15-minute access JWT expires quickly while TraceBin revokes the paired server-side refresh token immediately.

Why it matters when you launch

JWTs appear everywhere in modern auth providers, OAuth 2.0 OIDC ID tokens, and multi-service APIs because stateless signature verification scales cleanly across edge nodes and worker services. Following IETF RFC 7519 registered claims (`iss`, `sub`, `aud`, `exp`, `iat`, `jti`) gives every service a standard contract for who issued the token and who may accept it.

However, rolling custom JWT verification carelessly introduces severe security holes. IETF RFC 8725 (JWT Best Current Practices) instructs implementations to restrict accepted algorithms via an explicit allowlist, reject unsigned `alg: "none"` tokens, and check `iss`, `aud`, and `exp` on every request. For simple monolithic web apps, opaque `HttpOnly` server sessions are often easier to revoke immediately than long-lived JWTs.

Common mistakes

  • Assuming a signed JWT hides its contents and packing secrets or private user data into a Base64url-encoded JWS payload.
  • Trusting the `alg` header supplied by the caller without pinning an allowed algorithm server-side, opening `alg: "none"` or key-confusion attacks.
  • Storing long-lived JWTs in browser `localStorage` where any third-party script or XSS vulnerability can read and exfiltrate them.
  • Issuing 30-day JWTs with no short expiry or revocation plan, leaving banned users or leaked tokens valid until next month.

Tools and guides that use it

Official sources

Pritam Ghosh runs Hauntboard and maintains this glossary.

Published · Updated

Building something real? Launch it in public.

A person reviews every launch on Hauntboard, and every view and visit it sends your site is published on your launch page. Free to submit.

Launch free →

On the board

All →

Still hiding your app?

Put it on the board. Reviewed by a person, free to launch.

Launch free
Submit a launch