JWT decoder
Paste a JSON Web Token to read its header and claims, see when it expires in your time zone, and check its signature. Nothing leaves your browser.
A JWT looks like random text, but most of it is plain JSON that anyone can read. Paste a token below to see what's inside, when it expires, and whether its signature is genuine. Decoding and verification both happen in your browser, so the token and your key are never sent anywhere.
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2F1dGguZXhhbXBsZS5jb20iLCJzdWIiOiJ1c2VyXzU1MSIsImF1ZCI6ImFwaS5leGFtcGxlLmNvbSIsIm5hbWUiOiJQcml5YSBOYWlyIiwiZW1haWwiOiJwcml5YS5uYWlyQGV4YW1wbGUuY29tIiwicm9sZXMiOlsiZWRpdG9yIl0sInNjb3BlIjoicG9zdHM6cmVhZCBwb3N0czp3cml0ZSIsImlhdCI6MTc5NjA0MDAwMCwibmJmIjoxNzk2MDQwMDAwLCJleHAiOjE5NTM4NDk2MDAsImp0aSI6IjhmMmMxZTBhLTViN2QtNGYzZS05YTYxLTJkNGM3YjBlOWYxMyJ9.qSGf_kW9Kcs1xLxsRr1mJoqKmfBn-o5PlCdKj-4bgeQ
Decoded and checked in your browser. The token and key are never sent anywhere or saved.
{
"alg": "HS256",
"typ": "JWT"
}alg | Signing algorithm |
typ | Token type |
{
"iss": "https://auth.example.com",
"sub": "user_551",
"aud": "api.example.com",
"name": "Priya Nair",
"email": "priya.nair@example.com",
"roles": [
"editor"
],
"scope": "posts:read posts:write",
"iat": 1796040000,
"nbf": 1796040000,
"exp": 1953849600,
"jti": "8f2c1e0a-5b7d-4f3e-9a61-2d4c7b0e9f13"
}Enter the secret to check the signature.
iss | https://auth.example.comIssuer: who created and signed the token |
sub | user_551Subject: who the token is about, usually a user ID |
aud | api.example.comAudience: who the token is meant for; an API should reject tokens not addressed to it |
name | Priya NairUser's full name |
email | priya.nair@example.comUser's email address |
roles | ["editor"]Roles assigned to the user |
scope | posts:read posts:writePermissions granted, separated by spaces |
iat | Nov 30, 2026, 12:00:00 PM 1796040000Issued at: when the token was created |
nbf | Nov 30, 2026, 12:00:00 PM 1796040000Not before: the token must be rejected before this time |
exp | Dec 1, 2031, 12:00:00 AM 1953849600Expires at: the token must be rejected after this time |
jti | 8f2c1e0a-5b7d-4f3e-9a61-2d4c7b0e9f13JWT ID: a unique ID, used to stop the same token being replayed |
What's in a token
A JWT is three pieces of base64url text joined by dots:
header.payload.signature
- Header: which algorithm signed the token (
alg), and often which key (kid). - Payload: the claims: who the token is about (
sub), who issued it (iss), who it's for (aud), and when it expires (exp). - Signature: proof that the header and payload haven't been changed since the issuer signed them.
Base64url is an encoding, not encryption. Anyone holding the token can read the payload, so never put passwords, API keys or other secrets in it. If you need the contents hidden, that's a different format, JWE, which has five parts instead of three.
Decoding is not verifying
Reading a payload tells you what the token claims. Only the signature tells you whether to believe it. A server must verify the signature before trusting anything in the token, and should also check:
expandnbf, allowing a minute or so for clock differences between serversissis the issuer you expectaudincludes your API, so a token meant for another app can't be used on yours
The time claims are in seconds since 1970, not milliseconds. Comparing exp with Date.now() without dividing by 1000 is a classic bug that makes every token look valid for thousands of years.
Which key do I need?
It depends on the alg in the header:
| Algorithm | Key used to verify |
|---|---|
HS256, HS384, HS512 |
The same shared secret that signed it |
RS256, PS256, ES256 and similar |
The issuer's public key |
EdDSA |
The issuer's Ed25519 public key |
With HS*, anyone who can verify a token can also create one, so the secret must stay on your servers. With RS*, PS* and ES*, the issuer keeps the private key and publishes the public key, usually as a key set at /.well-known/jwks.json on the issuer's domain. You can paste that whole key set into the tool; it picks the right key using the token's kid.
Doing it in code
In Node, you can read a payload without any library:
const [, payload] = token.split(".");
const claims = JSON.parse(Buffer.from(payload, "base64url").toString("utf8"));
For verification, use a maintained library rather than writing it yourself. With jose:
import { createRemoteJWKSet, jwtVerify } from "jose";
const JWKS = createRemoteJWKSet(
new URL("https://auth.example.com/.well-known/jwks.json"),
);
const { payload } = await jwtVerify(token, JWKS, {
issuer: "https://auth.example.com",
audience: "api.example.com",
});
jwtVerify checks the signature, exp and nbf, the issuer and the audience in one call, and throws if any of them fail.
Two attacks to know about
alg: none. A token can claim it has no signature at all. Libraries reject it by default now, but code that readsalgfrom the token and does whatever it says can be fooled. The tool flags these tokens.- Algorithm confusion. If a server expects
RS256but accepts whateveralgthe token names, an attacker can sign a token withHS256, using the server's public key as the shared secret. Always tell your library which algorithms to accept instead of trusting the header.
Finally, be careful where you paste real tokens. A valid access token works like a password until it expires, and online decoders can log what you paste. This one runs entirely in your browser, but for production tokens, decoding locally with the two lines of code above is safest.