JWT Decoder
Decode a JSON Web Token and check its signature in your browser
Runs in your browser
Decoded in your browser. The token is never sent anywhere.
What is a JWT?
A JSON Web Token (JWT, RFC 7519) is a compact, URL-safe string with three parts separated by dots: a header saying how it is signed, a payload of claims such as the user id and expiry time, and a signature. The header and payload are only base64url-encoded, not encrypted, so anyone holding the token can read them. The signature proves the token was made by someone with the secret or private key and was not changed. This tool decodes the parts, turns exp, nbf and iat into dates in your time zone, and can check the signature with Web Crypto in your browser.
Use cases
- Debug a login: see which user, roles and scopes an access token carries
- Find out why an API answers 401: check whether the token has expired
- Confirm that a token was signed with the secret or public key you expect
- Learn how OAuth 2.0 and OpenID Connect ID tokens are built
When to use it?
Paste a token from an Authorization header, a cookie or local storage; a leading Bearer is removed for you. The header and payload appear as JSON with copy buttons, and the time claims are shown as dates with how long ago or how soon they are. To check the signature, paste the shared secret for HS256, HS384 and HS512, or the public key as PEM or JWK for RS, PS, ES and EdDSA. Decoding a token does not prove it is genuine: only a valid signature does.
Examples
HS256 token signed with a secret
Input
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkdldEl0IiwiaWF0IjoxNzAwMDAwMDAwLCJleHAiOjQxMDI0NDQ4MDB9.tam6-Oztg5zTqDX0sgLPaD76kIhxh_Xv75b6izxHgPA
Output
- Header
- {"alg":"HS256","typ":"JWT"}
- Payload
- {"sub":"1234567890","name":"GetIt","iat":1700000000,"exp":4102444800}
RS256 access token from an identity provider
Input
eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImsxIn0.eyJpc3MiOiJodHRwczovL2F1dGguZXhhbXBsZS5jb20iLCJhdWQiOiJhcGkiLCJzdWIiOiI0MiIsImlhdCI6MTcwMDAwMDAwMCwiZXhwIjoxNzAwMDAzNjAwfQ.c2lnbmF0dXJl
Output
- Header
- {"alg":"RS256","typ":"JWT","kid":"k1"}
- Payload
- {"iss":"https://auth.example.com","aud":"api","sub":"42","iat":1700000000,"exp":1700003600}
Unsigned token (alg none)
Input
eyJhbGciOiJub25lIn0.eyJzdWIiOiJ0ZXN0Iiwicm9sZSI6ImFkbWluIn0.
Output
- Header
- {"alg":"none"}
- Payload
- {"sub":"test","role":"admin"}
Questions and answers
Is it safe to paste my token here?
The token is decoded and checked in your browser and is never sent to a server. Still, treat live tokens like passwords: prefer test tokens, and never paste a production private key anywhere.
Can a JWT be read without the secret?
Yes. The header and payload are only base64url-encoded, so anyone can read them. The secret or private key is needed only to create a valid signature. Do not put passwords or other secrets in a JWT payload.
Why does it say the signature does not match?
Either the secret or key is wrong, the token was changed after signing, or the secret was base64-encoded by the issuer. For RS, ES and PS tokens you need the public key that matches the kid in the header, usually from the issuer’s JWKS endpoint.
What do exp, nbf and iat mean?
They are times in seconds since 1970 (NumericDate). exp is when the token expires, nbf is when it starts being valid, and iat is when it was issued. Servers usually allow a few seconds of clock skew.