JWT Decoder: Read a JSON Web Token and Check Its Signature
By FindMySum · Last reviewed
This JWT decoder shows what is inside a JSON Web Token: the header that names the signing algorithm, the claims about who the token is for and when it expires, and the signature. Paste a token to read it, and add the issuer's secret or public key if you want to check that the signature is genuine. Everything stays in your browser.
What a JWT is for
Most sign-in systems built on OAuth 2.0 and OpenID Connect hand out JWTs as access tokens and ID tokens. A server reads the claims to decide who you are and what you may do, without a database lookup, because the signature proves the issuer wrote them. Developers decode tokens to debug login problems: a wrong audience, a token that expired a minute ago, a clock that runs fast, or a missing scope.
How to use the tool
- Paste the token. A
Bearerprefix copied from an Authorization header is ignored. - Read the header and payload. Registered claims are listed with their meaning, and times are shown as dates.
- If the token looks expired or not yet valid, check the leeway setting: servers often allow 30 to 60 seconds of clock difference.
- To verify, paste the shared secret (HS algorithms) or the public key as PEM, a certificate, a JWK or a JWK Set from the issuer's JWKS address, and choose Verify signature.
A worked example
The example token is the one RFC 7519 uses. Its header decodes to {"typ":"JWT","alg":"HS256"}, so it is signed with HMAC-SHA256. Its payload says the issuer is joe and that it expires at 1300819380, which is 22 March 2011 at 18:43 UTC, so the decoder marks it as expired. With the example key from RFC 7515 Appendix A.1 the signature verifies; change one character of the payload and it no longer does.
Common mistakes
Trusting a decoded token. Decoding proves nothing. Only a verified signature, the expected algorithm and valid times make a token trustworthy.
Putting secrets in the payload. Anyone who holds the token can read every claim. Keep passwords, personal details and internal identifiers out of it.
Mixing up seconds and milliseconds. JWT times are in seconds. A JavaScript Date.now() value is in milliseconds and puts the expiry tens of thousands of years in the future.
Verifying with the wrong key type. HS256 needs the shared secret; RS256 needs the issuer's public key, not its private key.
To read other Base64 data, use Base64 decode and encode; to turn a timestamp into a date, use the Unix timestamp converter.