JWT Decoder

Decode a JSON Web Token, read every claim in plain English, check expiry and verify the signature. Your token never leaves this browser tab.

Samples:

Decoded and verified on this device. Nothing is uploaded or saved.

What is a JWT decoder for?

A JSON Web Token is how most web and mobile apps prove who you are after you log in: a compact string an API reads on every request. When a login breaks, a request is refused, or you need to know what an access token actually grants, decoding it shows the claims inside: the user, the audience, the scopes and the expiry. Verifying the signature tells you whether the token is genuine and unmodified. This page does both without sending the token anywhere.

How it works

  1. Paste the token (a Bearer prefix or quotes are removed) or try a sample.
  2. Read the decoded header and payload, and the Claims explained table with every time shown as a date.
  3. Check the badges: algorithm, Active or Expired (updated live), lifetime and signature status.
  4. To verify, enter the secret (HS256) or paste the public key, certificate or JWKS (RS256, ES256, EdDSA).

What's inside a JWT

A JWT is three Base64URL-encoded parts joined by dots: header.payload.signature. The header is a small JSON object naming the signing algorithm (alg) and often the key ID (kid). The payload holds the claims: facts about the user and the token. The signature is computed over the first two parts with the issuer's key, so any change to them breaks it. Both JSON parts start with {", which is why nearly every JWT begins with eyJ.

Encoding is not encryption: anyone who has the token can read the payload, exactly as this page does. The signature protects the token against changes, not against being read.

The registered claims

RFC 7519 defines seven standard claims. All are optional, but most identity providers send them:

Registered JWT claims with examples
ClaimMeaningExample
issIssuerhttps://auth.example.com
subSubject (usually the user ID)user_8723
audAudience: the API it's meant forhttps://api.example.com
expExpires at (seconds since 1970)1735693200 = 1 Jan 2025, 01:00 UTC
nbfNot valid before1735689600
iatIssued at1735689600 = 1 Jan 2025, 00:00 UTC
jtiUnique token ID, to block replays7c1f0f6a-3b0e-…

Times are seconds since 1 January 1970 UTC, not milliseconds. If an exp looks like 1735693200000, the issuer used milliseconds and most libraries will treat the token as valid for tens of thousands of years; the decoder warns about this. To convert other timestamps, use the Unix timestamp converter.

How to verify a JWT signature

  1. Look at the alg badge. HS256, HS384 and HS512 need the shared secret; RS256, PS256, ES256 and EdDSA need the issuer's public key.
  2. For a secret, type it exactly. Many frameworks store secrets Base64-encoded: if a secret you know is right fails, tick Secret is Base64-encoded.
  3. For a public key, open the issuer's JWKS (find jwks_uri in its /.well-known/openid-configuration) and paste the whole JSON. The key whose kid matches the token's header is used. A PEM PUBLIC KEY, RSA PUBLIC KEY or CERTIFICATE works too.
  4. Signature verified means the token was signed with that key and not altered since. A server must still check exp, nbf, iss and aud before trusting it.

This page can't fetch the JWKS for you, by design: it makes no network requests with your token. HS256 signatures are HMAC-SHA256, the same computation as the HMAC option in the hash generator.

Signing algorithms compared

JWT signing algorithms
algMethodKeyWho can verify
HS256 / HS384 / HS512HMAC with SHA-2One shared secret (at least 32 / 48 / 64 bytes)Only the issuer and the services sharing its secret
RS256 / RS384 / RS512RSA PKCS#1 v1.5RSA key pair (2048 bits or more)Anyone with the public key
PS256 / PS384 / PS512RSA-PSSRSA key pairAnyone with the public key
ES256 / ES384 / ES512ECDSA on P-256 / P-384 / P-521Elliptic-curve key pairAnyone with the public key
EdDSAEd25519Ed25519 key pairAnyone with the public key

With HS256, anything that can verify a token can also mint one, so the secret must stay on servers you control. When several services or third parties need to check tokens, an asymmetric algorithm (RS256 or ES256) lets them verify with a public key while only the issuer can sign. ES256 signatures are 64 bytes against 256 for RS256 with a 2048-bit key, which keeps tokens shorter.

Common JWT mistakes and attacks

  • Trusting the token's own alg. Accepting alg: none, or letting an attacker switch RS256 to HS256 and sign with your public key as the secret, lets anyone forge tokens. Servers should fix the expected algorithm.
  • Weak HMAC secrets. A short or dictionary-word HS256 secret can be brute-forced offline from a single token. Use at least 32 random bytes, for example from the password generator; this page warns when a secret is shorter.
  • Skipping claim checks. A valid signature doesn't mean the token is for you: also check exp, nbf, iss and aud.
  • Secrets in the payload. Anything in the payload is readable. Keep it to IDs and permissions; the decoder flags fields named like passwords or keys.
  • Tokens that live too long. A stolen token works until it expires. Short-lived access tokens (minutes to an hour) with refresh tokens limit the damage; the Lifetime badge shows how long this one lasts.

Each JWT part is ordinary Base64URL, which the Base64 decoder can also read. To tidy a large payload, paste it into the JSON formatter; for a token passed in a redirect URL, decode the URL first with the URL decoder.

Frequently asked questions

How do I decode a JWT?

Paste the token into the box. The header and payload are Base64URL-decoded instantly and shown as formatted JSON, every claim is explained in a table, and exp, iat and nbf are converted to readable dates with a live Active or Expired status. A leading 'Bearer ' or surrounding quotes are removed for you.

Does this JWT decoder send my token to a server?

No. Decoding and signature checks run in your browser with JavaScript and the built-in Web Crypto API. The token, secret and keys are never uploaded, logged or saved, not even in this browser's storage. Once the page has loaded it keeps working with the network switched off.

How do I verify a JWT signature?

Paste the token, then enter the key under Verify signature. For HS256, HS384 and HS512 that's the shared secret (tick 'Secret is Base64-encoded' if it's stored that way). For RS256, PS256, ES256 and EdDSA it's the issuer's public key: a PEM public key or certificate, a JWK, or the issuer's whole JWKS, from which the key matching the token's kid is picked.

Where do I find the public key to verify an RS256 token?

Identity providers publish their keys as a JWKS. Look up jwks_uri in the provider's /.well-known/openid-configuration document: for Auth0 it is https://YOUR_DOMAIN/.well-known/jwks.json, for Google https://www.googleapis.com/oauth2/v3/certs, and for Microsoft Entra ID https://login.microsoftonline.com/common/discovery/v2.0/keys. Open it, copy the JSON and paste it here.

Why does it say 'Invalid signature'?

The signature doesn't match the key you entered. Either it's the wrong secret or key (a different environment, a rotated key, a Base64-encoded secret entered as plain text), or the token was modified after it was signed. Changing even one character of the header or payload invalidates the signature, which is exactly what signatures are for.

What do exp, iat and nbf mean?

They are time claims holding seconds since 1 January 1970 UTC. exp is when the token expires, iat is when it was issued, and nbf (not before) is when it starts being valid. 1735689600, for example, is 1 January 2025 at 00:00 UTC. The tool shows each in your local time and in UTC, with how long ago or from now it is.

Is a JWT encrypted? Can anyone read the payload?

A normal signed JWT (JWS) is not encrypted: its header and payload are only Base64URL-encoded, so anyone holding the token can read them, as this page shows. The signature stops people changing it, not reading it. Never put passwords or other secrets in a payload. Encrypted tokens (JWE) have five parts instead of three, and only their header is readable without the key.

What's the difference between HS256, RS256 and ES256?

HS256 signs and verifies with one shared secret (HMAC with SHA-256), so everyone who can verify can also create tokens. RS256 uses an RSA key pair: the issuer signs with a private key and anyone can verify with the public key. ES256 does the same with an elliptic-curve key, giving much shorter keys and signatures. Use RS256 or ES256 when services other than the issuer need to verify tokens.

Why is my token shown as expired when it should still work?

The status compares exp with this device's clock, so check the clock is right. Also check exp is in seconds, not milliseconds: the tool warns if it looks like milliseconds. Servers usually allow a minute or two of clock skew, so a token that expired seconds ago may still be accepted briefly.

Is it safe to paste a production token into an online JWT decoder?

Only into one that doesn't upload it, like this one. A valid access token lets whoever holds it act as you until it expires, so a decoder that sends tokens to a server is a real risk. When you can, use a token from a test account, or one that has already expired.

What is the 'alg: none' vulnerability?

A token with alg set to none has no signature. Some early JWT libraries accepted such tokens as valid, letting attackers forge any claims. A related attack switches RS256 to HS256 and signs with the public key as the HMAC secret. Servers must fix the expected algorithm instead of trusting the token's alg header; this tool flags unsigned tokens.

Advertisement