A JWT builder that lets you assemble a JSON Web Token claim by claim and sign it with HS256, HS384 or HS512 right in your browser. It is for developers who need a valid token to test an API, seed a fixture, reproduce a bug, or learn how the three JWT segments fit together — without pasting a secret into an online service that might log it.
How it works
A JSON Web Token is three base64url-encoded parts joined by dots: header.payload.signature. The header declares the signing algorithm and token type. The payload carries your claims — both registered ones like sub, iss, aud, exp and any custom data you need. The signature proves the token has not been tampered with.
This tool builds all three. You edit the header (algorithm plus an optional field such as kid), add payload claims with the right JSON type, and toggle the standard time claims iat, nbf and exp. When you enter a secret, the tool base64url-encodes the header and payload, joins them, and runs HMAC over that string using the browser’s native crypto.subtle Web Crypto primitive. The resulting MAC is base64url-encoded and appended as the third segment. The token re-signs automatically every time you change a claim or the secret, so the output is always current.
Because HMAC is symmetric, the same secret both signs and verifies. Your server can validate the token by recomputing the signature with the identical secret and comparing — which is exactly what libraries like jsonwebtoken, jose or PyJWT do under the hood.
Example
Suppose you want a one-hour admin token for a staging API. Add sub = user-123, role = admin, set the issuer iss = https://gera.tools, enable iat and exp with a 1 hour preset, and use the secret your-256-bit-secret. The builder produces a token whose payload decodes to:
| Claim | Value |
|---|---|
| sub | user-123 |
| role | admin |
| iss | https://gera.tools |
| iat | 1717000000 (now) |
| exp | 1717003600 (now + 3600s) |
Copy it as Authorization: Bearer ... and paste straight into your HTTP client. Flip the algorithm to HS512 or change the expiry and the signature updates instantly.
Every byte is computed locally — the secret and the finished token are never uploaded or stored on any server.