Common causes
The wrong key or secret
A token signed with one secret fails against another, for example a staging secret in production, or a rotated key. The decoder cannot tell you which, because it does not have the key.
The algorithm does not match
Read the alg in the token's header and compare it with what your verifier expects. An HS256 token verified with an RSA public key, or the other way round, always fails.
Input
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
JWT Decoder says
alg = HS256
The token was changed on the way
Extra characters break the signature or the parsing. Most decoders, including this one, strip a leading Bearer and quotes, but a verifier usually wants the bare token.
Input
Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
JWT Decoder says
Decodes (the tool strips the Bearer prefix)
How to fix it
- Decode the token and read alg and kid in the header.
- Check that the verifier uses the same key, in the same form (a secret as text or as Base64, a public key in PEM).
- Pass only the token: no Bearer prefix, quotes or line breaks.
- Look for a key rotation: a kid that your key set does not contain.