Dev Tools guide
How to decode a JWT safely, and check its signature
A JWT is three Base64URL parts separated by dots: a header, a payload of claims and a signature. Decoding the first two needs no key, so do it somewhere that doesn’t send the token anywhere. Checking the signature needs the secret (HS256) or the public key (RS256, ES256). Dev Tools’ JWT decoder does both in your browser.
What’s inside a JWT
Take the token apart at the dots. The header says how it was signed ("alg": "HS256"); the payload holds the claims: who it’s about (sub), who issued it (iss), who it’s for (aud), when it was issued (iat) and when it expires (exp), as Unix timestamps. The signature proves the first two weren’t changed.
Why pasting tokens into websites is risky
A live access token is a key: whoever has it can call the API as that user until it expires. Many decoder sites are safe, but you can’t easily tell which ones log what you paste. Use a decoder that runs entirely in your browser, and prefer test tokens or expired ones when you can.
Dev Tools’ JWT decoder runs on your device with no server involved; you can turn off your connection and it still works. Its share links even warn you before a token goes into a link.
Decode and check a token
- Paste the token (a leading “Bearer ” is fine).
- Read the header and claims, with the times shown as dates and how long until it expires.
- Check the signature: paste the shared secret for HS256, HS384 or HS512, or the public key (PEM or JWK) for RS, PS and ES algorithms.
- Make a test token with your own claims and secret, to try your API’s handling of expired or wrong-audience tokens.
Mistakes to look for
"alg": "none". An unsigned token. A server must never accept it.- No
exp. A token that never expires is a key that never changes. - The wrong key type. An RS256 token checked as HS256 with the public key as the “secret” is a classic attack; servers should fix the algorithm, not read it from the token.
- Clock skew. A token “not valid yet” often means the issuing server’s clock is ahead.
Questions
Can I decode a JWT without the secret?
Yes. The header and payload are only Base64URL-encoded; the secret is needed only to check the signature.
Is it safe to paste a JWT into Dev Tools?
It runs entirely in your browser and sends nothing anywhere. Still treat live production tokens with care on shared computers.
What does “Invalid signature” mean?
The token was changed, or the key is wrong (a different secret, or the secret stored as Base64 when you pasted text).
Can it read an encrypted JWT?
No: a JWE (five parts) needs its decryption key. Most tokens are signed JWS tokens, which it reads.