JWT generator
Sign a JSON payload as a JWT with a secret (HS256) or a private key (RS256, ES256, EdDSA and more).
Enter a secret to sign the payload.
Missing a feature or found a bug in JWT generator? Tell me on X (@_andrewtran) or by email.
How to use JWT generator
- Write the payload as JSON.
- Choose the algorithm, then enter the secret or paste the private key.
- Copy the signed token from the output pane.
Questions and answers
Is my secret or key sent anywhere?
No. The token is signed by your browser on this device. Even so, use a test secret or key here and keep production ones in your own systems.
Which algorithms are supported?
HS256, HS384 and HS512 with a shared secret. RS256 to RS512, PS256 to PS512, ES256, ES384 and EdDSA with a private key in PKCS#8 PEM form.
How do I set an expiry?
Add an exp claim to the payload, as a Unix time in seconds. The timestamp converter can give you one.
Related tools
2FA code generator
Generate time-based one-time codes (TOTP) from a secret or an otpauth:// link, to test sign-in flows.File hash checker
Get the SHA-256, SHA-1, SHA-384 and SHA-512 checksum of any file and verify a download.Image to Base64
Encode an image as a Base64 data URI, ready to paste into HTML or CSS.Colour converter
Pick a colour and convert it between HEX, RGB, HSL, HSV and OKLCH.