Create HS256 signed JSON Web Tokens for testing, with your own payload and secret.
The tool signs your payload with HMAC SHA-256 (HS256) using the open-source jose library. It adds iat (the time the token was made) and exp (that time plus your expiry) automatically, so an exp already in your payload is replaced. Expiry accepts a number with a unit: s, m, h, d, w or y, such as 45s, 15m or 1w.
Your server will accept the token only if it uses the same secret and expects HS256. Tokens signed with RS256 or ES256 need a private key, which this tool doesn't handle.
For HS256 the secret should be long and random, at least 32 characters. Short or guessable secrets can be cracked offline from a single token. Signing happens in your browser and nothing is uploaded, but it's still good practice to use test secrets here rather than the key that protects your live users. The Password Generator can make a strong random secret.
HS256 only. It's the most common choice for apps that sign and verify tokens with one shared secret.
Usually the secret differs, the server expects another algorithm, or it checks claims like iss or aud that aren't in your payload.
Not with this tool; an expiry is always added. You can set a long one such as 1y for testing.
Yes. Paste it into the JWT Decoder to see the header, payload and expiry.
OneClickly is a set of 119 free tools for PDFs, images, text, everyday math and code. They run in your browser, so the files and text you work with stay on your device.