JWT Decoder & Validator
Paste your JWT token to decode and view the header, payload, and signature instantly.
Upload a .txt or .jwt file (max 5MB)
Decoding a JWT Is Not the Same as Verifying It
This is the single most important thing to understand about any JWT tool that runs in a browser, including this one: a JWT's header and payload are base64url-encoded, not encrypted. Decoding them requires no secret, no key, and no permission โ anyone with the token text can read every claim inside it. When you click "Validate" here, the tool checks that the token has three dot-separated parts and that the header and payload are valid JSON and valid base64url โ it does not and cannot cryptographically verify the signature, because that requires the issuer's secret key (for HMAC algorithms) or public key (for RSA/ECDSA), which never leaves your server and is never present in this page. The tool's own output says so explicitly after validation: "Signature verification requires the secret key, which is not available in the browser."
The practical consequence: a token that "decodes fine" here tells you nothing about whether it was legitimately issued. Anyone can construct a JSON object, base64url-encode it, and slap an arbitrary string after the second dot to produce something that decodes without error โ the string of characters after the last dot doesn't have to be a real signature to pass basic structural inspection. Never treat a decoded payload as trustworthy input for an authorization decision unless the signature was verified against the correct key using a proper JWT library on the server that issued or expects the token.
What is JWT (JSON Web Token)?
JWT (JSON Web Token) is an open standard (RFC 7519) for securely transmitting information between parties as a JSON object. JWTs are commonly used for authentication and authorization in modern web applications and APIs. A JWT consists of three Base64-encoded components separated by dots (.), each serving a specific purpose in the token lifecycle.
JWT Structure:
Header.Payload.Signature
Example:
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIn0.dozjgNryP4J3jVmNHl0w5N_XgL0n3I9PlFUP0THsR8U
Why This Isn't Quite Standard Base64
Each of the three JWT segments is base64url-encoded, not standard base64 โ a distinction that trips people up when they try to decode a token with a generic base64 tool and get garbage or an error. Base64url swaps + for - and / for _ (both characters are unsafe in URLs and cookie values) and drops the trailing = padding entirely. This decoder's own base64url routine reverses both substitutions and re-derives the correct padding from the string length before calling the browser's base64 decoder โ if you ever write your own JWT parsing code, that padding step is the part people most often get wrong.
Header
Announces alg and typ โ but note the header is attacker-controlled data too. A famous class of JWT library bugs came from trusting alg unconditionally (e.g. an "alg: none" token being accepted as unsigned).
Payload
Plain JSON claims, readable by anyone holding the token. There is no field-level encryption in a standard JWT (that's a separate, rarer spec called JWE) โ treat every claim as visible to the end user.
Signature
A MAC or digital signature over the first two segments. This tool displays it as raw base64url text โ it cannot recompute or check it, since that requires the signing secret or private key.
Standard JWT Claims
Registered Claims
iss- Issuer (who created the token)sub- Subject (whom the token is about)aud- Audience (intended recipients)exp- Expiration time (Unix timestamp)nbf- Not before (Unix timestamp)iat- Issued at (Unix timestamp)jti- JWT ID (unique identifier)
Common Public Claims
name- User's full nameemail- User's email addressroles- User roles/permissionsscope- OAuth 2.0 scopepicture- User profile picturepreferred_username- Usernamegiven_name- First name
Supported JWT Signing Algorithms
JWTs can be signed using different algorithms with varying security levels:
Symmetric (HMAC)
HS256- HMAC with SHA-256 (most common)HS384- HMAC with SHA-384HS512- HMAC with SHA-512
Asymmetric (RSA/ECDSA)
RS256- RSA with SHA-256ES256- ECDSA with SHA-256PS256- RSA PSS with SHA-256
Frequently Asked Questions
Why does "Validate" say the JWT is valid if it could still be forged?
"Valid" here means structurally well-formed: three parts, valid base64url, valid JSON in the header and payload. It is not a claim that the signature checks out โ this page has no way to verify a signature since that needs the issuer's secret or public key, which isn't available client-side.
I decoded a token from another service and the JSON looks wrong or throws an error โ why?
Most often this means the string you pasted isn't a JWT at all (e.g. it's an opaque OAuth access token, which many providers deliberately do not format as a JWT), or it's missing a segment. A real JWT always has exactly two dots separating three base64url segments.
What does the "exp" claim actually control, and does this tool enforce it?
"exp" is a Unix timestamp (seconds since epoch) the token's consumer is supposed to check against the current time to reject stale tokens. This decoder just displays the raw claim value โ it's up to your server-side code to compare it and reject expired tokens; a browser tool has no authority to "expire" anything.
Can I recover the signing secret from the signature shown here?
No. HMAC and RSA/ECDSA signatures are one-way โ the signature is derived from the secret and the token contents, but the secret cannot be reconstructed from the signature output, regardless of tooling.
Why do two tokens with identical claims produce different signatures?
If the "iat" (issued-at) claim differs by even one second, or key ordering in the JSON differs between the two encoders, the exact byte string being signed changes, which changes the signature completely โ HMAC and RSA signatures have no tolerance for near-matches.
HS256 vs RS256 โ which should I expect from a given provider?
HS256 uses one shared secret known to both signer and verifier (common for first-party, single-backend apps). RS256/ES256 use a private key to sign and a public key to verify, so third parties can validate tokens without ever holding the signing secret โ this is why most OAuth/OIDC identity providers (Google, Auth0, Okta) issue RS256 tokens.
