How to use the JWT Decoder tool
- Paste the token (with or without “Bearer ”).
- Read the decoded header, payload and the explained claims.
- To verify, paste the HMAC secret or the public key (PEM or JWK) and click “Verify”.
How a JWT is built
A JWT has three Base64url parts separated by dots: a header naming the algorithm, a payload with claims such as the user ID and expiry, and a signature. The first two parts are only encoded, not encrypted: anyone who has the token can read them. The signature is what prevents changes, and it is only worth something if the server checks it.
Security lessons from real systems
- Never put secrets or personal data in the payload. It is readable by anyone.
- Reject tokens with alg “none”, and do not let the token’s header choose the algorithm on the server.
- Keep access tokens short-lived (minutes), and use refresh tokens for longer sessions.
- HS256 secrets must be long and random, at least 32 bytes. Short secrets can be cracked offline from a single token.
- Validate iss, aud and exp, not only the signature.
Pasting a production token into an online tool is a risk in itself, because a valid token is a password for as long as it lives. This decoder runs entirely in your browser, but the safest habit is to use tokens from test environments, or expired ones.
Privacy
Tokens and keys are processed in your browser with the Web Crypto API. Nothing is uploaded or logged.
Frequently asked questions
Can I decode a JWT without the secret?
Yes. The header and payload are just Base64url. The secret is only needed to verify the signature.
Which algorithms can be verified?
HS256/384/512, RS256/384/512, PS256/384/512 and ES256/384/512.
What key format do I need for RS256?
A public key in PEM format (-----BEGIN PUBLIC KEY-----) or a JWK, for example one key from the provider’s JWKS endpoint.
What is the difference between JWT, JWS and JWE?
A signed JWT is a JWS. A JWE is encrypted, has five parts, and cannot be read without the decryption key.