JWT Generator

Create JSON Web Tokens with custom headers, payloads, and secrets. Signs tokens using HS256 (HMAC SHA-256) via the Web Crypto API. 100% client-side — nothing leaves your browser.

Header: -

Payload: -

Signature: -

About JWT Generation

JSON Web Tokens (JWT) are a compact, URL-safe way to represent claims between two parties. This tool generates signed JWTs using the HMAC SHA-256 algorithm, which is the most commonly used symmetric signing method.

How It Works

  • The header and payload are Base64url-encoded
  • A signature is created using HMAC-SHA256(base64url(header) + "." + base64url(payload), secret)
  • The final token is header.payload.signature
  • All signing happens client-side via the Web Crypto API

Common Payload Claims

  • sub — Subject (user ID)
  • iat — Issued At (Unix timestamp)
  • exp — Expiration Time (Unix timestamp)
  • iss — Issuer
  • aud — Audience

Related Tools