JWT Generator
Generate and sign JSON Web Tokens (JWT) using HMAC-SHA256, HMAC-SHA384, or HMAC-SHA512. · Updated
Client-side JWT generation helps you craft test tokens without shipping secrets to a hosted signer. Prefer short-lived claims and never reuse production secrets in the browser casually.
Common errors and fixes
Invalid JSON payload
Header and payload must be valid JSON objects before signing.
Secret required
Provide an HMAC secret for HS256/384/512 generation.
Unsupported algorithm
Use HS256, HS384, or HS512 with the Web Crypto path in this tool.
exp must be a number
Use a Unix timestamp (seconds) for the exp claim.
Options
| Option | Description |
|---|---|
| Signing Algorithm | Cryptographic HMAC hash algorithm used to sign the token payload. |
| Secret | The HMAC key that signs the token. Required. It is never saved, put in a URL, or sent anywhere. |
| Expires In (Seconds) | Token validity duration added to exp claim (0 for no exp claim). |
FAQ
How does this tool sign JWT tokens without a backend server?
It uses the browser's native Web Crypto API (crypto.subtle.sign) with HMAC keys. All cryptographic signing happens locally in memory.
Which signing algorithms are supported?
HMAC-SHA256 (HS256), HMAC-SHA384 (HS384), and HMAC-SHA512 (HS512) symmetric signing algorithms are supported.
Does this tool automatically add iat and exp claims?
Yes. By default, it automatically populates standard 'iat' (issued at) and calculates 'exp' (expiration) timestamps.