Skip to content
OneTooling

JWT Generator

Create and sign a JSON Web Token with HS256, HS384, HS512, RS256, or ES256 using Web Crypto. Keys and tokens never leave your browser.

Runs in your browser · nothing uploaded

Runs only in your browser. Nothing you type is sent anywhere. Even so, use test secrets and test keys here, not the real signing keys of a production system.

Time helpers

Used as plain text, the way most libraries take a string secret.

Signed tokenThe token appears here once the header, payload, and key are valid.

Why is there an ad? This tool is free and runs on your device. One small ad pays for hosting and new tools. No pop-ups, no autoplay, never inside the tool. How we make money

How to create a JWT

  1. Choose the signing algorithm. The header's "alg" follows your choice.
  2. Edit the payload claims. Use the time helpers to set iat, nbf, exp, or a random jti.
  3. Enter the secret, or for RS256 and ES256 paste a PKCS#8 private key or generate a test key pair.
  4. Copy the signed token from the right. It updates as you type.

To read an existing token instead, use the JWT Decoder. Need a random secret to sign with? The Password Generator makes long random strings.

Questions

Are my secret and private key sent anywhere?

No. The token is signed with your browser's built-in Web Crypto API and the page makes no network requests with your data. Still, use test secrets here. Never paste the signing key of a live production system into any website.

Which algorithms are supported?

HS256, HS384, and HS512 (a shared secret), RS256 (an RSA private key), and ES256 (a P-256 elliptic-curve private key). For RS256 and ES256, paste an unencrypted PKCS#8 key or let the tool generate a test key pair.

My key starts with BEGIN RSA PRIVATE KEY. Why is it rejected?

That is the older PKCS#1 format, and browsers only import PKCS#8. Convert it with: openssl pkcs8 -topk8 -nocrypt -in key.pem -out pkcs8.pem. EC keys that start with BEGIN EC PRIVATE KEY need the same conversion.

How do exp, iat, and nbf work?

They are Unix timestamps in seconds. iat is when the token was issued, nbf is the earliest time it is valid, and exp is when it expires. The time helpers fill them in from the current time, and the dates are shown under the payload.

How can I check the token I made?

Paste it into the JWT Decoder to read the header and payload and check an HMAC signature. For RS256 and ES256, verify it with the public key shown next to the private key.

Credits

Built by OneTooling using standard browser features. No third-party code runs on your data.