JWT Token
HS256 JWTs are HMAC-signed JSON for local development: a header, claims you control, and a signature with a shared secret. They are not an IdP. Do not point a production API at a token minted here. Use this to stub a frontend when Keycloak or Auth0 is down, then throw the secret away.
What the JWT token generator is for
Building or testing an authentication flow constantly requires tokens with specific claims — an expired one, an admin one, one missing a scope. Producing those by hand is slow and error-prone.
Signing a token here with a known secret gives you a controlled input for testing exactly how your system responds.
Common uses
- Creating test tokens while developing an API
- Producing an expired token to verify rejection logic
- Generating tokens with specific roles to test authorisation
- Reproducing a token structure documented by a provider
What the output means in the real world
The token string is what you put in Authorization: Bearer for a laptop demo. The secret you typed is a signing key: never commit it, never email it, never reuse it in production. If this token escaped to a shared Slack, rotate that secret and every token it signed.
How this fits into real work
alg confusion (RS256 vs HS256) happens when a server verifies with a public key but accepts HS256. Tokens from a toy HS256 mint must never be accepted by a production verifier that also has asymmetric keys.
Short exp values (five minutes) keep demo tokens from living in a browser history for a week. Mint a new one when it dies; do not set exp to 2099.
Real authentication uses OIDC, refresh-token rotation, and a key store. This generator is a fixture factory. If you need users, run a real issuer.
How to use this tool
- Edit the payload to include the claims you need — sub, exp, and any roles or scopes.
- Enter the signing secret your application uses to verify.
- Choose the algorithm, normally HS256.
- Generate and copy the token into your test client or Authorization header.
Tips
- Set exp deliberately: a token with no expiry is valid forever, which is dangerous even in testing.
- Never use development secrets in production, and never commit them to source control.
- Use our JWT decoder to confirm the token contains what you intended.
Privacy & how it works
Everything happens inside your browser. The values you type are held in page memory only, are never sent to a server, and disappear when you close the tab. You can confirm this in your browser's network tab: the only request a tool makes is one that names the tool for a usage count, with nothing you typed in it. The tools also work with the internet disconnected. Signing happens in the browser. Use development secrets only.
Frequently asked questions
- Can I use these tokens in production?
- No. These are for development and testing. Production tokens must be issued by your authentication server with secrets that never leave it.
- What is the difference between HS256 and RS256?
- HS256 uses one shared secret for signing and verification. RS256 uses a private key to sign and a public key to verify, which suits systems where verifiers should not be able to mint tokens.
Browse other tools
All tools run entirely in your browser — nothing you type is sent to a server, except the optional HIBP 5-character hash prefix.