Developer / Tokens
JWT Encoder and Generator
Create and sign a JSON Web Token from a JSON payload with HS256/384/512, RS256/384/512, PS256/384/512, or ES256/384, with quick iat and exp claims, for testing APIs.
JWT Encoder and Generator: A JWT is three Base64url parts joined by dots: a header naming the algorithm, the payload of claims, and a signature over the first two. HMAC algorithms sign with a shared secret; RSA and ECDSA sign with a private key so that anyone with the public key can verify. Signing uses your browser's Web Crypto API; ECDSA signatures are written as the 64- or 96-byte r‖s value that JWS requires. Runs 100% locally in your browser with zero server file uploads.
- Category
- Developer tools
- Runs
- In your browser
- Cost
- Free · no sign-up
- Availability
- Ready to use
Runs entirely in your browser
The token is signed in your browser with Web Crypto. Use test keys: a key pasted into any web page should be treated as exposed.
Standard claims
iss names who issued the token, sub whom it is about, aud who it is for, exp when it expires, nbf when it becomes valid, iat when it was issued, and jti a unique ID; times are seconds since 1 January 1970. Keep access tokens short-lived, minutes to an hour, and check exp and aud on every request.
To read a token, use the JWT decoder; to check its signature, the JWT verifier.
The none algorithm
Some libraries once accepted tokens with alg none and no signature; servers must always decide which algorithms they accept, never trusting the token's own header. That is why this tool offers only signed algorithms.
How to use it
- Choose the algorithm, and add a key ID if your server expects one.
- Edit the JSON payload; set iat or an expiry with one click.
- Enter the shared secret, or paste a test private key in PKCS #8 PEM format, and copy the token.
Privacy & limitations
The payload and keys stay in your browser. Use test keys only.
Related tools
Frequently asked questions
Is a JWT encrypted?
No: anyone can read a signed JWT's payload by decoding the Base64url. The signature only proves who made it and that it was not changed; never put secrets in a payload.
Which algorithm should I use?
HS256 when the same service creates and checks tokens; RS256 or ES256 when other services verify them with a public key. ES256 gives shorter tokens.
My key starts with BEGIN RSA PRIVATE KEY. What now?
That is PKCS #1; convert it with openssl pkcs8 -topk8 -nocrypt -in key.pem, which outputs the BEGIN PRIVATE KEY format the browser accepts.
Free tool · runs in your browser · no account required