JWT Decoder: Read Claims, Check Expiry and Verify the Signature
Part of Text tools: See all Text tools.
What is JWT Decoder?
A JWT decoder and verifier. Paste a JSON Web Token to see its header and payload as formatted JSON, a table of every claim with exp, iat and nbf shown as real dates in UTC and your time zone, and a summary that says whether the token has expired, is not valid yet or uses alg none. Add the shared secret or public key (PEM, JWK or JWKS) to verify HS256/384/512, RS256/384/512, PS256/384/512, ES256/384/512 or EdDSA signatures. It runs in your browser.
How to use JWT Decoder
- Paste the JWT into the first box. A Bearer prefix, quotes and line breaks are removed for you.
- Read the summary: algorithm, key id, whether it has expired or is not valid yet, and any warnings.
- Check the header, payload and the claims table, where time claims are shown as dates with how long ago or from now.
- To verify, paste the shared secret (HS tokens; tick base64 if your secret is stored encoded) or the public key as a PEM block, JWK or whole JWKS, then press Verify signature.
- Copy the header or payload JSON if you need it in a bug report or your editor.
Why use this tool?
Most JWT problems are expired tokens, clock skew, the wrong audience or the wrong key. This decoder answers those quickly: it turns NumericDate values into readable dates with a configurable clock leeway, explains the standard claims, flags alg none and millisecond timestamps, and verifies RSA, RSA-PSS, ECDSA, Ed25519 and HMAC signatures with the browser's Web Crypto API. Files are processed for your request and discarded.
FAQ
- Can anyone read a JWT?
- Yes. The header and payload are only base64url-encoded, not encrypted, so anyone who has the token can decode it. The signature stops people changing it, not reading it, so never put passwords or other secrets in claims.
- How do I know if a JWT has expired?
- Look at the exp claim. It is a Unix time in seconds. The summary converts it and says, for example, expired 2 hours ago or expires in 14 minutes, using your device clock and the leeway you set.
- Can this verify the signature?
- Yes, if you have the key. Use the shared secret for HS256, HS384 and HS512, or the issuer's public key (PEM BEGIN PUBLIC KEY, a JWK or the whole JWKS) for RS, PS, ES and EdDSA tokens. When you paste a JWKS, the key whose kid matches the token header is used.
- Why does verification fail with the right secret?
- Often the secret is stored base64-encoded and must be decoded first, or the other way round. Try the base64 option. Other causes are a staging key used on a production token, a token cut off when copying, or an ECDSA signature in DER form.
- Does a valid signature mean the token is safe to accept?
- Not on its own. It proves the key signed this exact header and payload. A server must also check exp and nbf, that iss is the issuer it trusts, that aud includes its own API, and that alg is the algorithm it expects.
- Why can't it read my token?
- Encrypted JWE tokens have five parts and need the private key to read. Opaque access tokens are random strings, not JWTs. The decoder says which case it sees.
- Is my token sent to your server?
- No. Decoding and verifying run in your browser with the Web Crypto API. Even so, a live token works like a password until it expires, so prefer test or expired tokens and never paste a private key.
What this JWT decoder does
A JSON Web Token (JWT) is the long string that starts with eyJ which login systems, OAuth providers and APIs pass around as an access token or ID token. It has three parts separated by dots: a header, a payload and a signature. The first two are just JSON encoded with base64url, so anyone holding the token can read them. This page decodes both parts as you type, shows them as formatted JSON, and lists every claim in a table with a short note on what it means.
Time claims are where most debugging time goes, so the decoder turns exp, iat, nbf, auth_time and updated_at into real dates in UTC and in your own time zone, with a plain "expires in 42 minutes" or "expired 3 days ago". The summary line tells you straight away whether the token has expired, is not valid yet, has no expiry at all, or uses the unsafe alg: none. If you have the key, a second box checks the signature with the Web Crypto API built into your browser.
How to use it
Paste the token into the first box. You can paste the whole Authorization: Bearer ... header or a value copied with quotes around it; the prefix, quotes and stray line breaks are removed. The header, payload, claims table and signature fill in immediately. Use Copy header JSON or Copy payload JSON to take the decoded parts into your editor or a bug report. Load example fills in a sample HS256 token and its test secret so you can see how each part looks.
To verify, paste the key into the lower box and press Verify signature. For tokens signed with HS256, HS384 or HS512 the key is the shared secret. Some systems store that secret base64-encoded; if yours does, tick the base64 box, because the secret text and the decoded bytes give different signatures. For RS, PS, ES and EdDSA tokens paste the issuer's public key, either as a PEM block that starts with -----BEGIN PUBLIC KEY----- or as JSON from the provider's JWKS endpoint. If you paste a whole JWKS, the key with the same kid as the token header is used.
Reading the header
The header says how the token was signed. alg is the algorithm, typ is usually JWT (or something like at+jwt for OAuth access tokens), and kid is the key id that tells the receiving server which of the issuer's keys to use. The common algorithms are:
- HS256, HS384, HS512: HMAC with SHA-2 and one shared secret. The same secret signs and verifies, so every service that checks the token can also create one.
- RS256, RS384, RS512: RSA signatures (PKCS#1 v1.5). The issuer signs with a private key and everyone else verifies with the public key. This is what Auth0, Okta, Microsoft Entra ID, Google and AWS Cognito tokens usually use.
- PS256, PS384, PS512: RSA-PSS, a newer RSA padding scheme with the same kind of keys.
- ES256, ES384, ES512: ECDSA on the P-256, P-384 and P-521 curves. Signatures are much shorter than RSA ones.
- EdDSA: Ed25519 signatures. Verification works in browsers that support Ed25519 in Web Crypto, which current versions of the major browsers do.
If the header says "alg": "none", the token has no signature and anyone could have written it. The summary flags this as a warning. A server that accepts such tokens has a serious bug.
Reading the payload and its claims
The payload is a JSON object of claims. A few names are registered in RFC 7519 and mean the same thing everywhere:
iss(issuer): who created the token, often the login server URL.sub(subject): the user or client the token is about, usually an id rather than a name.aud(audience): which API or app the token is meant for. It can be a string or a list.exp(expiration time): after this moment the token must be rejected.nbf(not before): before this moment the token must be rejected.iat(issued at): when the token was created.jti(JWT id): a unique id, useful for blocking a single token.
Everything else is defined by the provider: scope or scp for OAuth permissions, roles, email, name, nonce for OpenID Connect sign-in, or tid and oid in Microsoft tokens. The claims table labels the common ones and shows the rest as they are.
Why times in a JWT look like 1735693200
JWT dates are NumericDate values: whole seconds since 1 January 1970 UTC, the same as a Unix timestamp. 1735693200 is 1 January 2025 at 01:00 UTC. The decoder converts each one and also says how far it is from now, using your device clock. A classic bug is writing milliseconds (a 13-digit number) instead of seconds, which pushes the expiry tens of thousands of years into the future; the summary points this out if it sees it.
Servers often allow a small clock leeway, for example 30 or 60 seconds, so a token is not rejected just because two machines' clocks differ slightly. Set the leeway box to the same number your library uses to see the result it would give. If a token is rejected as "not yet valid" or "issued in the future" right after login, clock skew between the issuer and your server is the usual cause.
What verifying the signature proves
The signature covers the exact header and payload text. If it verifies with the right key, nobody has changed a single character since the token was signed. If you edit the payload, even one letter, verification fails. That is why you can read a JWT without any key, but you cannot change one without the issuer's secret or private key.
A valid signature is only part of the job. A real server must also check that exp and nbf are fine, that iss is the issuer it trusts, that aud contains its own API, and that the algorithm is the one it expects, never just whatever the header claims. Treat a green result here as "this key signed this token", not "this token should be accepted".
When verification fails, the usual causes are the wrong key (for example a staging key against a production token), a secret that is base64-encoded but entered as text or the other way round, a token that was trimmed when copied, or an ECDSA signature in DER form, which JWTs do not allow; the tool reports a signature of the wrong length for ES tokens. An X.509 certificate or a PKCS#1 BEGIN RSA PUBLIC KEY block cannot be imported directly, and the tool gives the OpenSSL command to convert it.
Tokens it cannot read
Some tokens are encrypted rather than signed. These JWE tokens have five parts instead of three and their payload cannot be read without the recipient's private key, so the tool tells you that instead of showing garbage. Opaque access tokens, the random strings some providers hand out, are not JWTs at all; only the provider's introspection endpoint can tell you what they contain. Session cookies from frameworks such as Rails or Flask look similar but use their own formats.
Is it safe to paste a token?
Decoding and verifying happen in JavaScript on this page using the browser's built-in Web Crypto API. The token and key are not sent to our server or stored. Even so, a live access token works like a password until it expires: anyone who copies it can call the API as that user. Prefer test tokens or tokens that have already expired, and log out or revoke the session if you think a token has leaked. Verifying never needs a private key, and the tool refuses a PEM private key if you paste one.
The same point applies to what goes into a token. Because the payload is only encoded, not encrypted, never put passwords, card numbers or other secrets in claims. Put an id in the token and look the sensitive data up on the server.
What this tool does not do
It does not create or sign new tokens, it does not decrypt JWE tokens, and it does not fetch keys from a JWKS URL for you; open the provider's /.well-known/jwks.json (or the jwks_uri in its OpenID configuration) and paste the JSON. It also does not decide whether your server should accept a token, since that depends on your own issuer, audience and algorithm rules.
Related tools
Use the timestamp converter to turn other Unix times into dates, the Base64 encoder and decoder for single segments or base64 secrets, the JSON formatter to tidy up large payloads, and the hash generator for SHA-256 checks.
Also try
Related tools that work well with this one: