How to use this JWT Decoder
Paste a JWT token into the input area and click Decode JWT. The tool will
split the token into its three segments, decode the header and payload from Base64URL, and
show them as formatted JSON when possible.
- Paste the JWT token into the input field.
- Click Decode JWT.
- Review the decoded header and payload.
- Copy the payload if needed for debugging or inspection.
What this tool shows
JWT tokens usually contain three sections separated by dots:
header.payload.signature
This tool decodes the first two parts into readable JSON and shows the third part as the
signature segment for reference.
Decoding is just Base64url — it is not verification
A JWT has three dot-separated parts: header.payload.signature. The header and
payload are nothing more than Base64url-encoded JSON — not encrypted, not
signed data, just reversible encoding. Decoding a JWT means Base64url-decoding those parts,
which is exactly what this tool does. It reads the token; it does not trust it.
The consequence people miss: anyone holding the token can read every claim inside
it. The signature stops a token from being modified undetected; it does
nothing to hide the contents. So never put anything sensitive — passwords, API keys,
personal data you would not log — in a JWT payload. If you can paste it here and read it, so
can anyone who intercepts it.
What real verification checks (that decoding does not)
Verifying a JWT is a separate, server-side step that needs the signing key, and it has two
halves. First, the signature: recompute it over
header.payload with the expected key and confirm it matches, which proves the
token was issued by someone holding the key and has not been altered. Second, the
claims:
exp — reject if the expiry time has passed.
nbf — reject if the "not before" time has not yet arrived.
iss — confirm the issuer is who you expect.
aud — confirm the token was intended for your service, not another.
A valid signature on a token issued for a different audience, or one that expired yesterday,
must still be rejected. Checking the signature alone is not enough.
The alg:none and RS256→HS256 attacks
Two classic JWT vulnerabilities both come from letting the token's own header
choose how it is verified. In the alg:none attack, an attacker sets
the header algorithm to none and strips the signature; a naive verifier that
honours the header accepts the unsigned token as valid.
The algorithm-confusion attack is subtler. RS256 is asymmetric: the server
signs with a private key and verifies with a public one that is not secret. If the attacker
changes the header to HS256 and signs the token using the server's
public key as an HMAC secret, a verifier that reads the algorithm from the token
will HMAC-verify with that same public key — and it matches. The public key was never meant
to be a secret, so the forgery succeeds. The fix for both is the same:
pin the expected algorithm server-side and never let the token dictate it.
Frequently Asked Questions
Does decoding a JWT verify that it is trustworthy?
No. Decoding is just Base64url-decoding the header and payload — it never checks the
signature. A decoded token could be expired, forged, or issued for a different service.
Verification requires the signing key and happens on your server.
Can other people read the data inside my JWT?
Yes. The payload is only Base64url-encoded, not encrypted, so anyone holding the token
can read every claim. Never store secrets or sensitive personal data in a JWT payload;
the signature protects integrity, not confidentiality.
What is inside the three parts of a JWT?
The header (algorithm and type), the payload (the claims), and the signature. The first
two are Base64url-encoded JSON; the signature is computed over
header.payload and is the only part that requires a key to produce or check.
What must a server check beyond the signature?
The claims: exp (not expired), nbf (already valid),
iss (expected issuer), and aud (intended for your service). A
perfectly signed token that expired or was meant for another audience must still be
rejected.
What are the alg:none and RS256-to-HS256 attacks?
Both abuse a verifier that trusts the token's alg header. alg:none
strips the signature entirely; the confusion attack re-signs an RS256 token as HS256 using
the public RSA key as the HMAC secret. Pin the expected algorithm on the server so the
token cannot choose its own verification method.
How do I revoke a JWT before it expires?
You largely cannot — that is the trade-off of stateless tokens. A signed JWT stays valid
until exp. Practical answers are short expiry times paired with refresh
tokens, or a server-side denylist of revoked token IDs, which reintroduces state but lets
you cut off a compromised token immediately.