Generate signed JSON Web Tokens with custom headers, payload claims and HMAC-SHA signing. Your secret key never leaves your browser — signing uses the Web Crypto API client-side.
Last updated: March 2026Generate JWTs for local testing, debugging auth flows, or generating signed payloads in scripts. Set custom claims, pick HMAC-SHA256 signing, and copy the token. This generator is for development only — don't use the output as production secrets, and never paste real production keys here.
HS256 (HMAC) is symmetric — same secret to sign and verify. RS256/ES256 are asymmetric — sign with private key, verify with public.typ: JWT, alg as picked. Add kid if your verifier rotates keys.iss (issuer), sub (user ID), aud (audience), exp (expiration — Unix seconds), iat (issued at), nbf (not before). Custom claims go alongside.header.payload.signature). Verify with the matching key in your auth server's JWT library.alg: none in production. Accepting unsigned tokens lets anyone forge any identity. Always whitelist allowed algorithms server-side.exp. Tokens without expiration live forever — a leaked token is permanent compromise. Set short exp (5–60 min) and rotate refresh tokens.JWE (encrypted JWT) for sensitive claims, or store server-side and reference by ID.iss and aud on the server. A token signed for service A can be replayed against service B if the secret is shared and audience isn't checked.iss, sub, exp, iat), and the Signature (HMAC or RSA signature of the header and payload). JWTs are widely used in OAuth 2.0, OpenID Connect, and stateless API authentication.exp claim is a Unix timestamp (seconds since epoch) indicating when the token expires. To expire in 1 hour, set exp to the current time plus 3600. Common companion claims include iat (issued at — when the token was created) and nbf (not before — the token is invalid before this time). Use the quick buttons above to auto-fill these values.crypto.subtle) for HMAC-SHA signing. Your secret key and payload data never leave your machine — no data is sent to any server. For production systems, always sign tokens on the server and never embed your signing secret in client-side JavaScript code.