Youtilities

Popular

All tools

JWT Decoder

Decode a JSON Web Token, read its claims and expiry, and verify HS256 signatures with a secret.

Runs in your browser. Nothing is uploaded.

Token

Waiting for a token

The header, payload, and expiry appear here.

What this does

Paste a JSON Web Token and see its header and payload as readable JSON, plus when it was issued and when it expires, in UTC and relative to now. A Bearer prefix is ignored.

Checking the signature

Decoding a JWT does not prove it is genuine; anyone can read it. If the token uses HS256, HS384, or HS512, enter the shared secret and the signature is checked in your browser with the Web Crypto API. Tokens signed with RS256 or ES256 need the public key and are not verified here.

The three parts of a JWT

A token looks like xxxxx.yyyyy.zzzzz. The first part is the header, which names the signing algorithm (alg) and often the key id (kid). The second is the payload, the claims: who the token is about (sub), who issued it (iss), who it is for (aud), and when it was issued (iat), becomes valid (nbf) and expires (exp). The third is the signature. The first two parts are Base64url-encoded JSON, not encrypted, which is why this page can show them without any key.

Why decoding is not verifying

Anyone can edit the payload of a token, re-encode it and paste it here; it will decode just as cleanly. Only the signature proves that the issuer created those exact claims. Servers must check the signature and the exp, nbf, iss and aud claims on every request, and must reject tokens whose header says alg none. Use this page to read what a token contains while debugging, not to decide whether to trust it.

Common errors

"A JWT has three parts separated by dots" usually means the token was cut off when copied, or has quotes or a trailing comma attached. A token with five parts is an encrypted JWE, which cannot be read without the decryption key. Times in the payload are seconds since 1 January 1970 in UTC; the Times table converts them, and an expiry in the past or a not-before in the future shows in red. If a token is rejected only on some servers, compare their clocks: a few minutes of drift is enough to make a fresh token look expired or not yet valid.

What not to put in a token

Because the payload is readable by anyone who holds the token, keep it to ids, roles and expiry. Do not include passwords, personal details or anything secret, and avoid passing tokens in URLs, where they end up in browser history and server logs.

Privacy

Tokens and secrets never leave the page. Nothing is sent to a server or stored.