JWT Decoder

Paste a JWT to expand its header and payload and see how long until it expires.

Standard Claims (Registered Claims)

iss - Issuer
sub - Subject
aud - Audience
exp - Expiration Time
nbf - Not Before
iat - Issued At
jti - JWT ID

A JWT is a token in three parts split by two dots. The first two parts are not encrypted; they are JSON written in Base64URL. The tool decodes them the moment you paste, and if you enter a secret key it checks an HMAC signature in this browser. The token is not sent anywhere.

Decoding the sample token

PartRaw text (start)Decoded
HeadereyJhbGciOiJIUzI1NiIs...{"alg": "HS256", "typ": "JWT"}
PayloadeyJzdWIiOiIxMjM0NTY3...{"sub": "1234567890", "name": "John Doe", "iat": 1516239022}
SignatureSflKxwRJSMeKKF2QT4fw...Shown as is, not decoded

Next to iat you see a readable time converted to your device's time zone. This token has no exp, so the status reads "no expiry". Enter your-256-bit-secret as the Secret Key and press Verify to see the signature match; change one character and it will not.

How the status line is chosen

The tool compares exp and nbf with the current time and shows the first row that matches.

ConditionStatus
exp is in the pastExpired (2 days 3 hours ago)
nbf is in the futureNot yet valid (nbf)
exp is in the futureValid (45 minutes left)
No expNo expiry

"Valid" here is only about time. The signature is checked only when you press Verify. The status is computed at the moment you decode, so press Decode again if the page has been open a while. An exp far in the future usually means the token used milliseconds; JWT times are in seconds.

When decoding or verifying fails

There must be exactly two dots. A token missing its end, or one with four dots, is an encrypted JWE. A leading Bearer or surrounding quotes cause an Invalid Base64 encoding error, and a value that is not a JWT, such as a session cookie, produces a JSON error.

Only HS256, HS384 and HS512 can be verified. RS256 and ES256 need a public key, so you can only read their contents. The secret is used exactly as typed, as UTF-8, so a server that Base64-decodes its key will give a different result. An unexpired token is a working login, so be careful when sharing your screen. A signature proves the payload was not altered but does not hide it, so keep passwords out of the payload. To make a test token, use the JWT generator.