JWT Builder: Sign Test Tokens with HS256, HS384 or HS512
Build a JSON Web Token from a list of claims and sign it with a shared secret. Use it to create test tokens for an API you are developing, or to check that your server accepts the tokens you expect it to accept.
Runs in your browser: your files and text are not uploaded. Free, no account needed.
Last updated: · Reviewed by the QuickTooly Team
Algorithms and how the secret is used
The tool supports the three HMAC algorithms from RFC 7518: HS256, HS384 and HS512. It signs with the open-source jose library. The header is always {"alg": "<your choice>", "typ": "JWT"}, with no kid. RS256, ES256 and other public-key algorithms are not available, because they need a private key rather than a shared secret.
The secret is used exactly as typed, as UTF-8 bytes. If your server stores its secret Base64-encoded and decodes it before verifying, paste the decoded value here, or the signatures will not match. RFC 7518 asks for a key at least as long as the hash: 32 bytes for HS256, 48 for HS384 and 64 for HS512. The tool does not enforce this, so a short test secret still signs.
How claim values are typed
- Always strings:
sub,iss,audandjti, because RFC 7519 defines them as StringOrURI values. Asubof 1234567890 stays the string "1234567890". - Numbers and booleans: in every other claim, including
exp,nbf,iatand custom claims, a plain number such as42becomes a JSON number andtrue/falsebecome booleans. A value such as 00123 keeps its leading zeros as text. Arrays and objects cannot be entered. - Keys: rows with an empty key are skipped, and two rows with the same key stop the build with an error.
- Time helpers: a row named
iatgets a Now button, and a row namedexpgets +1h, which sets the expiry to one hour (3600 seconds) from now.
Keep test secrets apart from production
Anyone who knows an HMAC secret can sign tokens your server will trust. Use a separate test secret here. If a production secret has been pasted somewhere it should not be, rotate it on the server. The token's payload is only Base64URL-encoded, so do not put passwords or other secrets in the claims.
Frequently Asked Questions
Why does my server reject the token with "invalid signature"?
Check three things: the algorithm matches what the server expects, the secret is the same string (not its Base64 form), and the server is not configured for RS256 or ES256. A claim your server expects as text but that looks like a number, such as an id of 42, is sent as a number here unless it is sub, iss, aud or jti, which can also cause a rejection after the signature check passes.
Can I add an audience list or a nested claim?
No. Each row holds one string, or a number for exp, nbf and iat. For an aud array or an object claim, build the token in code with a JWT library.
Does the token get a kid header?
No. The header contains only alg and typ. If your server picks the key by kid, it will not find one in tokens built here.
Related Tools
- JWT Decoder - paste the new token to read back its header and claims and see the expiry time.
- HMAC Generator - compute the raw HMAC-SHA256, SHA-1 or SHA-512 of any message with the same kind of secret.
- UUID Generator - create a random value for the jti claim.