Toolvito

Works on this device

JWT Decoder & Validator

Paste a JSON Web Token (JWT) to see its header and claims, with the times as dates. The tool checks whether the token is expired or not valid yet, and it can check the signature with a shared secret or a public key that you paste. Everything runs in this page: nothing is fetched or sent, and the token and the secret are not saved.

Decode or check a token

Shows the header and the claims of a JWT, with exp, nbf and iat as dates, and checks the times. The signature is not checked here.

Token and checks

Paste the whole token, three parts with dots between them. "Bearer " at the start is left out. It is masked and is not sent or saved.

Leave the date and the time blank to use the clock of this device now.

With a date and no time, the time is 00:00:00.

Seconds by which the clocks of two computers may differ. 0 checks the times exactly.

More options

Optional. The exact text the iss claim must have, such as the address of your sign-in service.

Optional. Your service: the aud claim must be this text or a list that holds it.

The token is read in this page. It is not sent or saved.

The decoded token will show here

Paste a token, or choose Try an example.

How to use the JWT decoder

  1. Choose Decode a token and check its times and paste the token. "Bearer " at the start is left out for you. The result follows as you type.
  2. Read the header, the claims and the time checks. Leave the date and time blank to check against the clock of this device now, or choose a moment yourself. Set a clock skew if the clocks of two computers may differ.
  3. Under More options, type the issuer and the audience your service expects, to check iss and aud too.
  4. To check the signature, choose Check an HS256, HS384 or HS512 signature with a shared secret and type the secret, or Check a signature with a public key and paste the public key as PEM or JWK.

Decoding is not verifying

The header and the payload of a JWT are only Base64url-encoded JSON. They are not encrypted, so anyone who has the token can read them, and anyone can write a token with any claims. A token that decodes well proves nothing about who made it.

Only the signature, checked with the right key, shows that the token was made by the holder of that key and was not changed. Even then, the receiver must take the key from a source it trusts, refuse tokens it does not expect and apply its own rules. This page never says that a token is safe: it says which checks pass.

Many people search for "decrypt JWT". A signed JWT (three parts) is not encrypted: decoding is all it takes to read it. An encrypted JWT (JWE, five parts) can only be read with the key of the receiver. This page shows the header of a JWE but does not decrypt it.

Keep your tokens and secrets safe

  • A JWT is often a bearer token: whoever has it can use it until it expires. The token box is masked like a password box. The token is not sent, saved or written into the CSV file, and the result does not repeat it.
  • The shared secret is masked too. It is never saved or written into a file, and the result says only how long it is.
  • Never paste a private key into a web page. Checking a signature needs only the public key, and this page refuses a private key.
  • Nothing is fetched: the page does not follow jku or x5u addresses and does not load a key set or a discovery document. Paste the public key or the key set yourself.

How the times are checked

exp, nbf and iat are NumericDates: seconds since 1970-01-01 00:00:00 UTC, without leap seconds (RFC 7519 section 2). The tool shows them as dates in UTC.

  • Expired when the time checked is at or after exp + skew (RFC 7519 section 4.1.4).
  • Not valid yet when the time checked is before nbf − skew (section 4.1.5).
  • Issued in the future when iat is after the time checked + skew. RFC 7519 sets no rule for this; it is shown as a problem because the clocks may differ.
  • A time that is not a number, or that looks like milliseconds (after the year 5000), is shown as a problem.
  • With an expected issuer, iss must be exactly that text. With an expected audience, aud must be that text or a list that holds it (sections 4.1.1 and 4.1.3).

Which signatures can be checked

The signature is checked by the Web Crypto functions of your browser over the first two parts of the token exactly as they were pasted (RFC 7515 section 5.2).

  • HS256, HS384, HS512 (HMAC): type the shared secret as plain text, Base64url, Base64 or hexadecimal. RFC 7518 section 3.2 requires a key at least as long as the hash: 32, 48 or 64 bytes. A shorter key is reported.
  • RS256, RS384, RS512 (RSASSA-PKCS1-v1_5) and PS256, PS384, PS512 (RSASSA-PSS): paste the RSA public key. RFC 7518 section 3.3 requires at least 2,048 bits; a shorter key is reported.
  • ES256, ES384, ES512 (ECDSA on P-256, P-384 and P-521): the signature in a JWS is R and S side by side, 64, 96 or 132 bytes (RFC 7518 section 3.4). A signature in DER form is named as such.
  • EdDSA with an Ed25519 key (RFC 8037). Ed448 keys cannot be checked in browsers.
  • The key can be a PEM block (BEGIN PUBLIC KEY or BEGIN RSA PUBLIC KEY), one JWK, or a JWK set from which the key with the kid of the token is taken.
  • alg none is never accepted as a valid signature. A token whose alg needs a public key is never checked with a secret, and the other way round: mixing them is a known attack.

Why a token cannot be decoded

  • It does not have three parts with two dots between them. A token cut at the end of a line, or one that lost its signature, has two parts.
  • It holds a space or a line break, often from copying it out of a log or an email.
  • A part uses + or / from standard Base64. A JWT uses Base64url, which writes - and _ instead.
  • The header is not JSON, has no alg, or is not an object. The tool names the part and the character where the problem is.

Worked example

The example token has the header {"alg":"HS256","typ":"JWT"} and the claims iss https://auth.example.com/, sub user-123, aud api.example.com, iat and nbf 1772364600 and exp 1772368200, name and scope.

1772364600 seconds after 1970-01-01 00:00:00 UTC is 2026-03-01 11:30:00 UTC, and 1772368200 is 2026-03-01 12:30:00 UTC: the token is valid for one hour. Checked at 2026-03-01 12:00:00 UTC it is valid, with 1,800 seconds (30 minutes) left.

In the mode for shared secrets, Try an example fills in the secret that signed this token. It has 32 bytes, the least RFC 7518 allows for HS256, and the signature is valid. Change one letter of the secret and it is not valid.

Limits you should know

  • Only the compact form is read (parts with dots). The JSON forms of JWS and JWE are not read.
  • Encrypted tokens (JWE) are not decrypted. Extensions listed in crit are not supported, so such a token is decoded but its signature is not checked.
  • The tool does not know the rules of any service: which issuer, audience, algorithm or key it expects, or whether a token was revoked. Those checks belong to the receiver.
  • Some providers issue access tokens that are not JWTs at all (opaque tokens). They cannot be decoded.
  • This page gives no program code. The steps are the same in every language: split at the dots, Base64url-decode the first two parts, read them as JSON, and check the signature with a JWT library and a trusted key.

Related tools