See what is really inside a JWT
LOCALDecode a JWT to read its header and claims, see iat and exp in local time, and check an HS256 signature with your own secret.
How it works
- 01
Paste the token
Paste a JWT from a header, cookie or log line. The decoder trims spaces and splits on dots, and it needs exactly three segments: header, payload and signature. Tokens copied from a terminal often carry a newline.
- 02
Read both JSON parts
The header names the algorithm and type; the payload holds the claims such as sub, iss, aud and roles. Both parts are decoded as UTF-8 and printed as indented JSON. Base64url is an encoding, not encryption.
- 03
Check the timestamps
iat, nbf and exp are Unix seconds, not milliseconds. The tool converts each value to local time and adds a relative phrase. An expired exp is shown in red; a missing exp means the token has no built-in lifetime.
When to use it
Debugging a 401
On a 401 or 403, check whether the token is malformed, expired or signed with another key. Decoding shows the sub and scope claims, exp and algorithm without sending the token to a third party.
Inspecting OIDC tokens
Access and ID tokens are both JWTs but not interchangeable. An ID token carries identity claims, an access token carries API permissions. Providers sign ID tokens with RS256, so local HMAC checks do not apply.
Incident and expiry checks
During an incident you may need to confirm when a session should have ended. The relative time next to exp becomes a sentence for the ticket, and the token never leaves the tab.
Questions
What are the three parts?
A JWT has a header, a payload and a signature, separated by dots. The header is a small JSON object naming the algorithm and type. The payload holds claims such as sub, iss, aud, iat and exp. The signature is a base64url value computed over the first two parts. There is no fourth part.
Is a JWT encrypted?
Normally no. A signed JWT is base64url encoded, which anyone holding it can reverse, so the header and payload are readable without a key. Encryption is a separate option called JWE and produces five parts. Assume the holder can read any password or personal data you put in custom claims. The signature is keyed.
Why need the secret?
The signature is an HMAC computed from the header, the payload and a secret shared by issuer and verifier. Without that secret you cannot recompute it, so you cannot tell a genuine token from an edited one. Decoding alone proves nothing about authenticity, and the secret is never sent anywhere. Keep it local.
What does alg=none mean?
alg=none declares a token without a signature. Some old libraries accepted such tokens as valid, which let an attacker rewrite the payload freely. Modern libraries reject none unless it is explicitly allowed. If you see this value, treat the token as untrusted. This decoder shows a warning, not a green result.
Seconds or milliseconds?
Both exp and iat are Unix timestamps in seconds. JavaScript's Date uses milliseconds, so a value such as 1924992000 must be multiplied by 1000 before formatting; treating it as milliseconds pushes the date to January 1970. This tool converts seconds correctly and shows local time. No manual multiplication is needed.
Safe to paste a production token?
The token never leaves your browser, and the page has no upload step. Still, a bearer token is a password while it is valid: anyone who reads it can act as that user. Prefer test tokens, revoke anything pasted into an unknown tool, and avoid shared or recorded screens. The value stays sensitive.