JWT Decoder, Verifier & Token Generator
Decode JWTs, check exp and iat, verify HS256, RS256, ES256 or EdDSA signatures with a secret, PEM key or JWKS, and sign test tokens, all in your browser.
Private by design: your token, secret and keys never leave this browser tab. Decoding, signature checks and test signing run locally with the Web Crypto API, and nothing is sent anywhere.
Registered claims
Verify the signature
Paste a token above to check its signature.
Create and sign a test token
For testing only. Use throwaway secrets and keys made for testing, such as the ones the buttons below generate. Never paste a production secret or private key into any website, this one included: anyone who has it can sign tokens your servers will accept. Everything here stays in this browser tab.
How to use the JWT decoder
Paste a token into the box. It may start with Bearer or be split over
several lines, or sit inside a JSON response, callback URL or cookie; the
first token found is decoded. The header and payload appear as formatted
JSON, and exp, nbf and iat are shown as dates in UTC and your time
zone, with a badge saying whether the token is valid right now.
To check the signature, enter the key under Verify the signature. The field follows the algorithm in the token’s header:
| Algorithm | Signed with | Verify with |
|---|---|---|
| HS256, HS384, HS512 | Shared secret (HMAC) | The same secret, as text or Base64 |
| RS256, RS384, RS512 | RSA private key (PKCS #1 v1.5) | RSA public key |
| PS256, PS384, PS512 | RSA private key (PSS) | RSA public key |
| ES256, ES384, ES512 | EC private key (P-256, P-384, P-521) | EC public key |
| EdDSA | Ed25519 private key | Ed25519 public key |
A public key can be PEM (BEGIN PUBLIC KEY, BEGIN RSA PUBLIC KEY or a
certificate), a single JWK, or a whole JWKS as served at a provider’s
jwks_uri. From a JWKS the key whose kid matches the token is used; the
Key from the set list lets you try any other key by hand.
Create a test token
Under Create and sign a test token, pick an algorithm, edit the header
and payload JSON, and the signed token appears at once. HMAC tokens use a
secret (a random 64-byte one is filled in). For RS, PS, ES and EdDSA, paste
a private key as PKCS#8 PEM, an RSA PRIVATE KEY or EC PRIVATE KEY block,
or a JWK, or press Generate a test key pair; the matching public key is
shown as PEM and JWK. Decode and verify it above loads the token and its
key into the decoder. Use this for tests and demos only, with throwaway keys,
never your production secrets.
What is inside a JWT
A JWT (RFC 7519) is three Base64url strings joined by dots: header,
payload and signature. Base64url is an encoding, not encryption, so anyone
holding the token can read the payload. The signature covers the exact
characters of header.payload, which is why changing one character makes
verification fail. The time claims count seconds since 1970-01-01 UTC; a
13-digit value is in milliseconds, a common bug the page warns about.
How verification and signing work
Both use the browser’s Web Crypto API as RFC 7518 defines the algorithms: HMAC for HS, RSASSA-PKCS1-v1_5 for RS, RSA-PSS with a salt as long as the hash for PS, ECDSA with the raw R‖S signature (64, 96 or 132 bytes) for ES, and Ed25519 for EdDSA (RFC 8037), where the browser supports it.
Security notes
alg: nonemarks an unsigned token, which a server must never accept.- Algorithm confusion. A server that trusts the header’s
algcan be tricked into using its RSA public key as an HMAC secret. Configure the expected algorithm on the server. - Short HMAC secrets can be guessed offline from one token. RFC 7518 requires at least 32 bytes for HS256.
- A valid signature proves who issued the token, not that it is meant for
you: also check
exp,nbf,issandaud.
Frequently asked questions
Is my token sent to a server?
No. Decoding, verifying and signing run entirely in your browser with JavaScript and the Web Crypto API. Tokens, secrets and keys are never uploaded or stored.
Can anyone read the contents of my JWT?
Yes. The header and payload are only Base64url-encoded, not encrypted, so anyone who has the token can decode them. Keep secrets out of the payload, or use an encrypted JWE token.
Why does verification fail even though the secret is right?
Check whether the secret is stored Base64-encoded (tick “Secret is Base64 encoded”), that no spaces or line breaks were copied with it, and that the whole token was pasted. Any change to the header or payload also breaks the signature.
Can I use the generator to make tokens for my real app?
Only for testing. Signing a token needs the real secret or private key, and those should never be pasted into any website. Use a test key, such as one the generator makes, and configure your development server to trust it.
Where do I get the public key for a provider's tokens?
Identity providers publish their keys as a JWKS. Open the provider’s /.well-known/openid-configuration, follow the jwks_uri link and paste the JSON here; the key matching the token’s kid is picked automatically.