How to use the JWT decoder
- Paste a token into the left pane. A leading
Bearerand surrounding quotes are removed automatically. - The right pane shows the header, the payload and the raw signature.
- To verify an HMAC signature, enter the key in HMAC secret. The status bar reports
signature verified ✓orsignature does NOT match this secret.
Readable time claims
Numeric date claims (exp, iat, nbf, auth_time, updated_at) get an inline comment with the UTC time and a relative description:
// Payload
{
"sub": "usr_1024",
"name": "Linh Nguyen",
"roles": [
"admin"
],
"iat": 1790000000, // 2026-09-21T14:13:20Z (6 days ago)
"exp": 4102444800 // 2100-01-01T00:00:00Z (in 73 years)
}
The relative time is calculated from your device clock.
Warnings you might see
| Warning | Meaning |
|---|---|
Expired 25 years ago. |
exp is in the past, so servers must reject the token |
Not valid yet: nbf is in 2 hours. |
nbf is in the future, often a clock skew problem |
alg is "none": this token is unsigned… |
The token has no signature and must never be accepted |
Signature verification here supports HS256/384/512… |
A secret was entered for an RS/ES/PS token |
Common problems
- Truncated token. Copying from a log line or a narrow terminal often cuts off a segment. The decoder then reports
A JWT has 3 parts separated by dots (header.payload.signature); this input has 2. - Encrypted token. Five segments means a JWE. Its payload can’t be read without the decryption key.
- Comparing tokens. To see which claims changed between an old and a new token, decode both and paste the results into Text Diff.
Decoding happens in your browser, but a Share link stores the input in the URL. Don’t share links that contain real tokens; anyone with the link can read them.
JWT structure in brief
A JWT is three Base64URL segments joined by dots:
- Header: the signing algorithm (
alg) and usuallytyp: "JWT"or a key ID (kid). - Payload: the claims. Registered claims include
iss(issuer),sub(subject),aud(audience),exp(expiry),nbf(not before),iat(issued at) andjti(token ID). All times are Unix seconds. - Signature: HMAC or a public-key signature over
header.payload.
HS algorithms use one shared secret to sign and verify, so every service that verifies tokens can also mint them. RS and ES algorithms sign with a private key and verify with a public key, often published as a JWKS. That is the usual choice for OAuth and OpenID Connect providers.
Verifying in code
Always verify on the server with a maintained library, and pin the algorithms you accept:
// Node.js — jose
import { jwtVerify } from 'jose';
const { payload } = await jwtVerify(token, new TextEncoder().encode(secret), {
algorithms: ['HS256'],
issuer: 'https://auth.example.com',
});
# Python — PyJWT
import jwt
payload = jwt.decode(token, secret, algorithms=["HS256"], audience="my-api")
Each segment is plain Base64 in the URL-safe alphabet. To convert claim timestamps, use the Unix Timestamp Converter.
Frequently asked questions
Is it safe to paste a real token here?
The token is decoded in your browser and never uploaded, so it does not leave your machine. Treat live tokens with care anyway: anyone who sees a valid token can use it until it expires, so avoid sharing screenshots or share links that contain one.
Does decoding a JWT mean it is valid?
No. The header and payload are only Base64URL-encoded JSON, so anyone can read them without a key. A token is trustworthy only after your server verifies the signature with the right key and checks exp, nbf, iss and aud. Decoding is for debugging, not for authorization.
Which signatures can it verify?
HMAC tokens signed with HS256, HS384 or HS512. Enter the shared secret in HMAC secret and the status bar says whether the signature matches. RS256, ES256 and other public-key algorithms are decoded but not verified; if you enter a secret for one, a warning explains that.
How do I try verification?
The sample token is signed with the demo secret tidypane-demo-secret. Load the sample, type that value into HMAC secret, and the status changes to signature verified. Change one character of the secret and it reports that the signature does not match.
Why is my token rejected as having the wrong number of parts?
A signed JWT (JWS) has exactly three dot-separated parts: header.payload.signature. Five parts means an encrypted JWE, whose payload can't be read without the decryption key. Other counts usually mean the token was truncated or copied with extra text.
Last updated