JWT Decoder
About the JWT Decoder
This JWT decoder splits a JSON Web Token into its header, payload and signature and shows each part as formatted JSON. It converts exp, iat and nbf into readable dates, tells you whether the token has expired, and can verify HS256, HS384 and HS512 signatures with your secret, all locally in the browser.
What is a JWT?
A JSON Web Token (RFC 7519) is a compact, URL-safe way to pass claims between systems, most often as an access token in an Authorization: Bearer header. It has three base64url-encoded parts separated by dots: header.payload.signature.
The header names the signing algorithm, for example {"alg":"HS256","typ":"JWT"}, which encodes to eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9. That is why almost every JWT starts with eyJ. The payload holds the claims, and the signature proves the first two parts have not been changed.
Standard JWT claims
Registered claims have short names: iss (issuer), sub (subject, usually a user ID), aud (intended audience), exp (expiration time), nbf (not valid before), iat (issued at) and jti (unique token ID).
Time claims are NumericDate values: seconds since 1970-01-01 UTC, not milliseconds. "exp": 1735689600 means 2025-01-01 00:00:00 UTC. The Token Validity card converts each one to your local time, an ISO timestamp and a relative time such as "in 2 hours".
Decoding is not verifying
Anyone can read a JWT: the payload is only encoded, not encrypted. Never put passwords or other secrets in a token payload, and never trust a decoded claim until the signature has been checked on the server.
This tool can verify HMAC tokens (HS256, HS384, HS512) because they use a shared secret. RS256, ES256 and other asymmetric algorithms need the issuer's public key, usually published as a JWKS, and are decoded but not verified here. Tokens with alg: none are unsigned and should be rejected by any API.
JWS vs JWE
Most JWTs are JWS tokens: signed, readable, three parts. A JWE is encrypted and has five parts. Its payload cannot be read without the decryption key, so the decoder recognizes the five-part shape and tells you instead of showing an error about invalid Base64.
How to Use the JWT Decoder
- Paste a token into the JWT Token Input box (a leading Bearer prefix is removed automatically), or click Load Sample. Decoding happens as you paste, and the Token Validity card shows alg, typ, kid, the time claims and an Expired, Not yet valid or Not expired badge.
- Open the Header, Payload and Signature tabs to read each part, then use Copy JSON or Download JSON to take the header or payload, or Copy String for the signature.
- To check an HS256, HS384 or HS512 token, open the Signature tab, enter the shared secret (tick "Secret is base64 encoded" if it is stored that way) and click Verify, or press Ctrl/Cmd+Enter. Clear removes the token.
JWT Decoder Examples
Decode the sample token
A fake HS256 sample, signed with the public test secret your-256-bit-secret. The exp claim is 2100-01-01 UTC, so it shows as Not expired.
Input:
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6Ikpvc8OpIE3DvGxsZXIg8J-YgCIsImlhdCI6MTUxNjIzOTAyMiwiZXhwIjo0MTAyNDQ0ODAwLCJyb2xlIjoidXNlciJ9.AgqyJztEpzBvq41Sl8G6HrHIMuYJQSvVWeYaumCAJBc
Output:
Header:
{
"alg": "HS256",
"typ": "JWT"
}
Payload:
{
"sub": "1234567890",
"name": "José Müller 😀",
"iat": 1516239022,
"exp": 4102444800,
"role": "user"
}
Verify with the correct secret
Same token, Signature tab, secret typed in plain text.
Input:
Secret: your-256-bit-secret
Output:
Signature verified (HS256).
Verify with a wrong secret
Same token with a different secret. A single changed character in the token gives the same result.
Input:
Secret: wrong-secret
Output:
Invalid signature: the secret does not match or the token was modified.
Common Errors
- Invalid JWT format: expected 3 dot-separated parts, got N
- A JWT is header.payload.signature. Paste the whole token and nothing else; a value cut at a dot, or a different kind of string, gives this error.
- This looks like an encrypted JWE (5 parts)
- The token is encrypted, not just signed. Its contents cannot be read without the decryption key, so this tool cannot decode it.
- Header (or Payload) contains characters that are not valid base64url
- The pasted text has stray characters such as quotation marks or a line break inside the token. Remove them so the token is one unbroken string.
- Payload must be a JSON object
- The middle part decoded to something other than a {...} object, such as an array. Check that you pasted the token itself and not a different encoded value.
- RS256 uses a public/private key pair; only HMAC verification is supported
- Asymmetric tokens (RS256, ES256 and so on) are decoded but not verified here. Check them on the server with the issuer's public key.
Frequently Asked Questions
- Is it safe to paste a token here?
- Decoding and verification run entirely in your browser; the token and secret are never sent anywhere. Even so, treat live production tokens as credentials and prefer test or expired tokens where you can.
- Can this tool verify RS256 or ES256 tokens?
- Not currently. It decodes them fully but only verifies HMAC algorithms (HS256, HS384, HS512), which use a shared secret instead of a public key.
- Why does my token show as expired?
- Its exp time is in the past according to your computer's clock. A wrong system clock can also cause this, which is why servers usually allow a small leeway.
- Can a JWT payload be encrypted?
- A standard signed JWT (JWS) is only encoded and anyone can read it. Encrypted tokens use JWE, which has five parts and cannot be decoded without the key.
- Why does verification fail with the correct secret?
- Check whether the issuer treats the secret as raw text or as Base64; toggle "Secret is base64 encoded" to try the other. Also make sure the token was copied in full, with no missing characters.