JWT Decoder
Decode a JSON Web Token to read its header and claims, see when it expires, spot risky settings, and check its signature with a secret or public key.
- Free, no sign-up
- Runs in your browser
- Sources cited
Paste a JWT, or a whole “Authorization: Bearer …” header. It stays on this device.
Signature
Algorithm: HS25632 bytesThe shared secret the token was signed with. Never stored or sent.
- Text
- Base64
- Base64 URL-safe
Enter the secret to check the signature.
a05be7c8f9f3dad276c257e2ef491ec6cf3ce942d012a2a7d2c2d8b123baad33
Header
{
"alg": "HS256",
"typ": "JWT"
}Payload (claims)
{
"iss": "https://auth.example.com",
"sub": "user-1042",
"aud": "https://api.example.com",
"iat": 1700000000,
"nbf": 1700000000,
"exp": 1700003600,
"scope": "read:reports"
}Claims explained
| Claim | Value | Meaning |
|---|---|---|
| iss | "https://auth.example.com" | Issuer: who made the token. |
| sub | "user-1042" | Subject: who or what the token is about, usually a user ID. |
| aud | "https://api.example.com" | Audience: who the token is meant for. |
| iat | 17000000002023-11-14T22:13:20.000Z | Issued at: when the token was made. |
| nbf | 17000000002023-11-14T22:13:20.000Z | Not before: not to be accepted before this time. |
| exp | 17000036002023-11-14T23:13:20.000Z | Expires: not to be accepted from this time. |
| scope | "read:reports" | Scope: the permissions granted. |
Things to check
- Anyone who has the token can read the payload. Never put passwords or secrets in it.
How to use the JWT decoder
Paste the token
Paste a JWT, or a whole Authorization header; the Bearer prefix is removed for you. The three parts are coloured so you can see where each starts.
Read the header and payload
Both are shown as formatted JSON with copy buttons, and every claim is explained, with times shown as dates.
Check the times
A banner says whether the token is expired, not valid yet, or valid now, and how long it lasts.
Check the signature
For HS256, HS384 and HS512 tokens, enter the shared secret. For RS, PS, ES and EdDSA tokens, paste the public key as PEM, a JWK, or the issuer’s JWK set.
Review the warnings
The tool flags unsigned tokens, missing expiry, long lifetimes and secrets that are too short.
How JSON Web Tokens work
A JSON Web Token, defined in RFC 7519, carries claims, such as who a user is and when the token expires, in a compact, URL-safe string. Most JWTs are signed with JSON Web Signature, RFC 7515: three base64url parts separated by dots, the header, the payload and the signature.
The header names the signing algorithm in alg. The payload holds the claims; the standard ones, listed in the IANA JWT claims registry, include iss (issuer), sub (subject), aud (audience), and the times exp, nbf and iat as Unix seconds. The signature covers the header and payload exactly as encoded, so changing a single character makes it fail.
RFC 7518 defines the algorithms. HS256, HS384 and HS512 use an HMAC with a secret shared by issuer and checker, and require a key at least as long as the hash. RS and PS algorithms use RSA, ES uses elliptic curves, and EdDSA uses Ed25519; for these the issuer signs with a private key and anyone can check with the public key, which issuers often publish as a JWK set.
Decoding needs no key, so anyone holding a token can read its payload: it is encoded, not encrypted. Encrypted tokens use JWE and have five parts, of which only the header is readable. The JWT best current practices warn against accepting the none algorithm, letting the token choose its own algorithm, and weak secrets. Everything here runs in your browser; tokens, secrets and keys are never stored or sent.
Worked example
The example token starts with the header part eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9. Decoded from base64url it reads {"alg":"HS256","typ":"JWT"}: the algorithm is HS256. The payload part, eyJpc3MiOiJodHRwczovL2F1…, decodes to claims including the subject "user-1042".
Its iat is 1700000000, which is 2023-11-14T22:13:20.000Z, and its exp is 1700003600, which is 2023-11-14T23:13:20.000Z: the token lasts 3600 seconds. The last part, oFvnyPnz2tJ2wlfi70kexs886ULQEqKn0sLYsSO6rTM, is a 32-byte HMAC.
With the secret example-secret-for-testing-only-0123456789, 42 bytes long, the signature is verified. Change the subject to "user-1043" and keep the old signature, and the check fails: without the secret nobody can make a valid signature for the changed claims.
Understanding the result, and common mistakes
- Signature verified
- The header and payload are exactly as the key holder signed them. It does not mean the token is still valid: check the times and the audience too.
- Invalid signature
- The token was changed after signing, or the secret or key is not the one it was signed with.
- Expired or not valid yet
- Compared with your device’s clock. Servers often allow a minute or two of difference between clocks.
- Trusting a decoded token without checking the signature. Anyone can write a payload.
- Putting secrets in the payload. It is readable by anyone with the token.
- Accepting alg none or letting the header pick the algorithm. Servers should only accept the algorithms they expect.
- Using a short, guessable HMAC secret. Use at least as many random bytes as the hash output.
Frequently asked questions
Is it safe to paste a real token here?
The token is decoded in your browser and never sent or stored, and it never appears in the page address. Still, treat live tokens like passwords and prefer expired or test tokens when you can.
Can I decode a JWT without the secret?
Yes. The header and payload are only base64url encoded. You need the secret or public key only to check the signature.
Where do I find the public key?
Identity providers publish their keys as a JWK set, usually at a jwks_uri listed in their OpenID configuration. Paste the whole set; the tool picks the key with the token’s kid.
Why does my signature fail?
The wrong secret or key, a secret entered as text when it is Base64, or a token that was changed or cut short when copied.
Can it decrypt encrypted tokens?
No. For JWE tokens it shows the header and explains that the content is encrypted.
Sources
- RFC 7519: JSON Web Token (JWT)RFC Editor · retrieved Nov 14, 2026
- RFC 7515: JSON Web Signature (JWS)RFC Editor · retrieved Nov 14, 2026
- RFC 7518: JSON Web Algorithms (JWA)RFC Editor · retrieved Nov 14, 2026
- RFC 8725: JSON Web Token Best Current PracticesRFC Editor · retrieved Nov 14, 2026
- JSON Web Token (JWT) claims registryInternet Assigned Numbers Authority · retrieved Nov 14, 2026
About these results
- Tokens are decoded and checked in your browser. Tokens, secrets and keys are never stored or sent.