JWT Decoder

Decode and inspect JWT header, payload and expiry — entirely in your browser.

Runs in your browserUpdated Built and maintained by Leon and Henrik

Paste a JSON Web Token and read its header, payload and expiry instantly — decoded locally, never uploaded. Free. No sign-up. Runs in your browser, nothing is uploaded.

JWT Decoder
Paste a token above to inspect its header, payload and expiry. Decoding happens entirely in your browser.
Runs in your browser
Nothing is uploaded

Paste a token and you see three things at once: the header with its signing algorithm, the payload with all claims as pretty-printed JSON, and the time claims exp, iat and nbf converted to UTC dates with a relative time such as "in 58 minutes" or "3 days ago". A badge shows Expired or Not expired based on exp. You can paste the raw token, a full Authorization: Bearer … header or a line copied out of a log — the clutter is stripped before decoding.

Reading a token: what the three parts hold

A JWT is three base64url strings joined by dots: header.payload.signature.

  • Header — usually {"alg": "HS256", "typ": "JWT"}. alg names how the signature was made: HS256 uses a shared secret, RS256 and ES256 use a private key with a public key for checking.
  • Payload — the claims: who the token is about, who issued it, for whom, until when, plus whatever custom data the app adds (roles, tenant, scopes).
  • Signature — computed over the first two parts. Change a single character of the payload and the signature no longer matches.

Base64url is the URL-safe variant of Base64: - and _ replace + and /, and the = padding is dropped, so the token survives in URLs and headers. Decoding it back is trivial, which is why reading a JWT proves nothing about whether it is genuine.

The claims you will see most

ClaimMeaningExample value
subSubject — usually the user ID"user_8412"
issIssuer — who created the token"https://auth.example.com"
audAudience — which API it is meant for"api.example.com"
expExpiry time, Unix seconds1767225600
iatIssued-at time, Unix seconds1767222000
nbfNot valid before, Unix seconds1767222000
jtiUnique token ID, used for revocation lists"b3c1…"

The times are seconds since 1 January 1970 UTC. In the example, exp: 1767225600 is 1 January 2026, 00:00:00 UTC, and iat is exactly 3,600 seconds earlier — a token with a one-hour lifetime. The decoder does this arithmetic for you; for any other timestamp, the Unix Timestamp Converter helps.

A common slip in hand-built tokens: writing exp in milliseconds (13 digits, as JavaScript's Date.now() returns) instead of seconds (10 digits). The token then appears to expire tens of thousands of years from now.

Why a request is rejected even though the token decodes

SymptomCheckTypical cause
401 right after loginnbf and iat in the future?Server and client clocks disagree by a few seconds or minutes
401 after a whileBadge says ExpiredThe access token's lifetime ran out; the app should refresh it
401 although "Not expired"aud and issToken issued for a different API or environment (staging vs production)
401 although everything looks rightHeader alg, the key in useSignature check fails: wrong secret, rotated key, wrong algorithm configured
403 instead of 401Custom claims like role, scopeToken is valid, but lacks the permission the endpoint needs

The badge uses your computer's clock. If your clock is off, it can disagree with the server even on a perfectly fine token.

Decoding versus verifying

Decoding answers "what does this token claim?". Verifying answers "can I believe it?", and only the second one should ever grant access. Server-side, that means:

  • Verify with a maintained library and pin the algorithm you expect, rather than trusting whatever alg the header names. Tokens with "alg": "none" or a swapped algorithm are a classic attack.
  • Check exp, nbf, iss and aud every time, not just the signature.
  • Keep secrets and private keys on the server. Any page that asks you to paste a signing secret to "verify" a token is asking for the one thing that lets someone forge new tokens.

Because the payload is readable by anyone holding the token, treat it like a postcard: user IDs and roles are fine, passwords and personal data are not. If you want to see how the SHA-256 digests behind HMAC signatures behave, the Hash Generator computes them.

Frequently asked questions