What it does
Edit the header and payload as JSON, choose an algorithm and enter a secret. The token is signed in your browser using the Web Crypto API and updates as you type.
Good to know
- HS256/384/512 sign and verify with the same shared secret. RS256/384/512, PS256/384/512, ES256/384/512 and EdDSA sign with a private key; the matching public key is what you give to the JWT Decoder (or anyone else) to verify, never the private key.
- Use "Generate new key pair" to create an RSA, RSA-PSS, EC or Ed25519 key pair on this device for testing — nothing is uploaded. For production keys, generate them with proper key-management tooling instead.
- PS256/384/512 is RSA-PSS, a different signature scheme from RS256 even with the same RSA key. EdDSA here means Ed25519 and needs a browser that supports it in Web Crypto; the option is turned off with a note where it does not. The key box accepts a PKCS8 PEM private key or a private JWK, and "Hide key text on screen" masks it visually without changing the value.
- The header's
algfield is set from your selection automatically;typdefaults toJWTif not set. - Never put a real production secret into an online tool. Use this for local development, testing and learning, and generate real secrets with your own tooling.
Pairs with
Use the JWT Decoder to inspect a token you already have.
Example: a signed token you can verify
With the header {"alg":"HS256","typ":"JWT"}, the payload {"sub":"123","name":"Ada"}, the secret example-secret and “Set iat automatically” switched off, the generator produces:
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjMiLCJuYW1lIjoiQWRhIn0.wxsctKD2sGEqeTH_sUNwc8yG91LrzW-iYS8caXl4afcThis is the same token you get from an independent HMAC-SHA256 computation over the first two parts, which is a good way to check a signing tool. Paste it into the JWT Decoder with the same secret and it reports “Signature verified”; with a different secret it reports “Signature verification failed”. With “Set iat automatically” ticked, which is the default, the issued-at time is added, so the token is different each time.
Which algorithm?
- HS256, HS384, HS512 use one shared secret to sign and to verify. Keep the secret private on both sides.
- RS, PS and ES algorithms and EdDSA sign with a private key. You give the matching public key to whoever verifies the token, never the private key. “Generate new key pair” creates a test key pair on your device.
Use generated tokens for testing and learning. For production, create keys with proper key-management tooling, and remember that anyone who knows the signing key can issue valid tokens.
Frequently asked questions
Where is the token signed?
In your browser with the Web Crypto API. The key and the token are not uploaded.
Does a JWT hide its contents?
No. The header and payload are only Base64URL-encoded, and anyone can read them. The signature proves that they were not changed, but it does not hide them.
Why does my token change every time?
Because the issued-at claim (iat) is set automatically to the current time. Switch that option off for a fixed token.
Privacy
This tool runs entirely in your browser. What you enter is processed on your device and is not sent to a server.