How to use the JWT decoder
- Paste the token into the box. A leading
Beareris ignored. - Read the header and payload. Dates such as
expandiatare shown in your local time, with a note if the token has expired. - To check the signature, paste the shared secret (HS256) or the public key in PEM or JWK form (RS256, ES256, PS256).
What is inside a JWT?
A JSON Web Token is three Base64URL strings joined by dots: header.payload.signature.
- Header: the signing algorithm (
alg) and the token type, and sometimes a key ID (kid). - Payload: the claims, which are statements about the user and the token itself.
- Signature: proof that the header and payload were signed by someone who holds the key and have not been changed.
The header and payload are only encoded, not encrypted. Anyone who has the token can read them, so never put secrets in a JWT.
Standard claims
| Claim | Name | Meaning |
|---|---|---|
iss | Issuer | Who created the token |
sub | Subject | Who the token is about, usually a user ID |
aud | Audience | Which service the token is meant for |
exp | Expiration time | The token must be rejected after this time |
nbf | Not before | The token must be rejected before this time |
iat | Issued at | When the token was created |
jti | JWT ID | A unique ID, used to stop a token being replayed |
The time claims are Unix timestamps in seconds. Convert others with the Unix timestamp converter.
Is it safe to paste a token here?
Decoding and signature checks run in your browser with the built-in Web Crypto API. The token and any key you enter are not uploaded, logged or stored. Even so, treat live production tokens like passwords and follow your own organization's rules.
Supported algorithms
Signature verification supports HS256, HS384, HS512 (shared secret), RS256, RS384, RS512, PS256, PS384, PS512 (RSA public key) and ES256, ES384, ES512 (elliptic curve public key). Any token can be decoded whatever its algorithm.
Related: Base64 encoder and decoder and JSON formatter.
Frequently asked questions
How do I decode a JWT?
Paste it into the box. The header and payload are shown as formatted JSON straight away.
Can a JWT be decoded without the secret?
Yes. The header and payload are only Base64URL encoded. The secret or public key is needed only to verify the signature.
How do I know if a JWT has expired?
Look at the exp claim. This tool converts it to a date and shows whether it is in the past.
Is my token sent to a server?
No. Everything runs in your browser, and nothing is uploaded or saved.
Why does signature verification fail?
The usual causes are the wrong key, a secret that is Base64 encoded (tick the box), or a public key for a different algorithm than the one in the header.