Edit the header and payload as JSON, pick an algorithm, and get a signed JWT. Signing uses the browser’s Web Crypto API (crypto.subtle), so secrets and private keys stay on your machine.
- HS256 / HS384 / HS512 use a shared secret. The secret can be entered as UTF-8 text, Base64/Base64URL or hex.
- RS256/384/512, PS256/384/512 and ES256/384/512 need a private key in PEM format. PKCS#8 (
-----BEGIN PRIVATE KEY-----) works for all of them, and PKCS#1 RSA keys (-----BEGIN RSA PRIVATE KEY-----) are converted automatically. For an EC key in SEC1 format, convert it first withopenssl pkcs8 -topk8 -nocrypt -in key.pem. - EdDSA signs with an Ed25519 key in PKCS#8 PEM, such as one from
openssl genpkey -algorithm ed25519. It depends on Ed25519 support in the browser’s Web Crypto, which current Chrome, Edge, Firefox and Safari have; older browsers get a clear message instead of a token. - Generate key pair creates a fresh test key for the selected algorithm and shows the matching public key, which you can paste into the verifier side of your app.
The helper buttons add iat, exp (one hour ahead) and nbf claims using the current Unix time. The header’s alg is kept in sync with the selected algorithm. The default sample reproduces the well-known HS256 example token, which is handy for checking a JWT library.
Use test keys here, not production signing keys. To inspect an existing token, use the JWT Decoder.