JWT decoder
Paste a JWT to read its header and claims, see when it expires, and spot risky settings. The token never leaves your browser and is not saved in the URL.
Runs entirely in your browser — your input is never uploaded.
Decoded locally. The token is not stored in the URL or sent anywhere.
How a JWT is put together
A JSON Web Token in compact form is three base64url strings joined by dots:
header.payload.signature
- Header: JSON describing the token, most importantly
alg, the signing algorithm. - Payload: JSON claims such as the user id (
sub), issuer (iss), audience (aud) and expiry (exp). - Signature: computed over
header.payloadwith a secret or private key.
The decoder reverses the base64url encoding of the first two parts and shows them as JSON. It also converts the time claims to readable dates and checks the token for common mistakes. It does not check the signature.
Example
The sample token decodes to this payload:
{
"sub": "user_8421",
"name": "Ada Lovelace",
"roles": ["admin", "billing"],
"iss": "https://auth.example.com",
"aud": "api.example.com",
"iat": 1767225600,
"nbf": 1767225600,
"exp": 1767229200
}
iat and exp are one hour apart: issued 2026-01-01 00:00 UTC and expiring at 01:00 UTC. That is a sensible lifetime for an access token.
Decoding a token on the command line
You don’t need a website to read a payload. With jq installed:
cut -d. -f2 <<<"$TOKEN" | tr '_-' '/+' | base64 -d 2>/dev/null | jq .
base64 -d may complain about missing padding. The JSON usually prints anyway; add = characters until the length is a multiple of four if it does not.
What the warnings mean
| Warning | Why it matters |
|---|---|
alg is none | The token is unsigned. Servers must reject it and pin the algorithm they expect. |
No exp | A stolen token stays valid until the signing key is rotated. |
| Lifetime over 24 hours | Long-lived access tokens make leaks worse. Use short access tokens and refresh tokens. |
| Times in milliseconds | exp is in seconds. 1767229200000 read as seconds is around the year 58,000, not 2026. |
| Sensitive-looking claims | Anyone holding the token can read every claim. |
jku / x5u in the header | Fetching keys from a URL in the token lets attackers supply their own key unless the URL is allow-listed. |
Validating tokens in your own code
Decoding is not validation. A server should, in this order:
- Reject tokens whose
algis not the one it expects. Never take it from the header. - Verify the signature with the right key (look up
kidin your JWKS). - Check
expandnbf, allowing a small clock skew of 30–60 seconds. - Check
issandaudmatch your issuer and your service.
Most libraries do all of this when configured with an explicit algorithm, issuer and audience. Do that instead of decoding claims yourself.
Frequently asked questions
- Does this tool verify the JWT signature?
- No. Verifying needs the secret (HS256) or the public key (RS256/ES256), and checking a signature in a public web page would encourage pasting keys. Decoding only shows what the token claims; your server must verify it before trusting anything inside.
- Is it safe to paste a production token here?
- Decoding runs entirely in your browser and the token is not written to the URL, storage or analytics. Even so, treat a live access token like a password: prefer an expired one or a token from a test environment.
- Why can anyone read my JWT payload?
- A signed JWT (JWS) is only base64url-encoded, not encrypted. The signature proves who issued it and that it was not changed, but it hides nothing. Use an encrypted JWE, or keep sensitive data out of the token.
- What does "exp" mean and what unit is it in?
- exp is the expiration time as a NumericDate: whole seconds since 1970-01-01T00:00:00Z. A value with 13 digits is almost always milliseconds by mistake, which makes the token valid for thousands of years.
- Why is alg "none" dangerous?
- It declares the token unsigned. Libraries that trust the alg header have accepted forged tokens this way, so servers must pin the expected algorithm and reject "none".
Related tools
YAML ⇄ JSON converter
Convert YAML to JSON and back with exact error positions, anchor and merge-key expansion, and warnings for YAML 1.1 gotchas like the Norway problem.
KubernetesKubernetes YAML validator and visualizer
Paste Kubernetes manifests to get a resource diagram and a security and best-practice review: privileged pods, root, probes, limits, deprecated APIs.
KubernetesBeta
Last updated · More Security tools