A JSON Web Token (JWT) is three Base64URL parts joined by dots: a header, a payload of claims, and a signature. This generator builds the token for you and signs it with HMAC (HS256, HS384 or HS512) using the WebCrypto API, so the signing happens entirely on your device.
How to use
- Pick an algorithm — HS256 is the default and what most systems use.
- Edit the header and payload claims (JSON), and enter a test secret.
- Click Generate token, then copy the token or download it as a text file.
- To check a token, switch to Decode & verify, paste the token and the secret, and the tool will show the decoded parts and whether the signature matches.
About this tool
The tool signs with the WebCrypto crypto.subtle HMAC implementation — the same standard browsers use for real cryptography — and it was checked against the well-known jwt.io test vector: header {"alg":"HS256","typ":"JWT"}, payload {"sub":"1234567890","name":"John Doe","iat":1516239022}, secret your-256-bit-secret produces the token ending SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c. The Load jwt.io test vector button fills in exactly those values so you can confirm it yourself.
How do I use this tool?
- Choose Generate a token and set the algorithm, header, payload and a test secret.
- Press Generate token — the signed token appears in the Token box with its decoded header and payload below.
- Use Copy token or Download .txt to take it into your API tests.
- To verify, switch modes, paste a token and its secret, and press Decode & verify.
Where is this tool used?
Developers use test JWTs when building login and API authentication: seeding a test user into Postman or a curl request, checking that a backend accepts or rejects an expired token (exp claim), or confirming that a changed secret invalidates old tokens. It is also handy when learning how JWTs are structured, because you can see each part change as you edit the claims.
What are the limitations?
This tool only supports symmetric HMAC algorithms (HS256/384/512) — it cannot sign RS256/ES256 tokens, which need a private key. It does not check expiry or audience for you beyond showing the claims; your API decides what a token means. A JWT payload is only Base64-encoded, not encrypted, so never put passwords or personal data in the claims.
Frequently asked questions
Is my secret sent anywhere?
No. Signing happens in your browser with the WebCrypto API. Your secret and claims never leave your device, and nothing is stored — closing the tab removes all trace.
Which algorithm should I choose?
HS256 is the default and what most systems use. HS384 and HS512 use longer hashes for the same HMAC construction; pick the one your backend expects, because the algorithm in the header must match the verifier.
Can I verify a token made somewhere else?
Yes. Switch to Decode and verify, paste the token and the secret it was signed with, and the tool will tell you whether the signature matches and show the decoded header and payload.
Why does the tool warn against real secrets?
Anyone who knows the HMAC secret can forge valid tokens for your API. Only ever use throwaway test secrets here, and never paste a live user token — it can grant access to that account.
Updated November 2026 · Built and tested by Sharjeel Tahir · How our tools are tested