JWT decoder / verifier

Decode a JWT's header and payload, verify its signature, and see when it expires.

Token

What a JSON Web Token is

A JSON Web Token (JWT) is a compact, self-contained way to carry a set of claims — statements such as "this is user 42" or "this token expires at noon" — in a form that can be verified. JWTs are everywhere in modern authentication: after you log in, a server often hands your browser a signed JWT, and every later request includes it so the server can trust who you are without looking anything up. Because the token carries its own claims and signature, it is described as "stateless".

A JWT is three Base64URL-encoded parts joined by dots: header.payload.signature. This tool splits and decodes those parts for you, shows the claims in a readable form, and — if you provide the signing key — verifies that the signature is genuine.

The three parts

  • Header: describes how the token is signed, most importantly the algorithm ("alg", e.g. HS256 or RS256) and the token type.
  • Payload: the claims themselves — a JSON object with fields like sub (subject/user), exp (expiry), iat (issued-at) and any custom data the issuer added.
  • Signature: a cryptographic value computed over the header and payload with a secret or private key. It is what makes a JWT trustworthy: change a single character of the payload and the signature no longer matches.

Crucially, the header and payload are only encoded, not encrypted. Anyone who has the token can read them. The signature does not hide the contents — it proves they have not been tampered with. Never put passwords or secrets in a JWT payload.

Verifying the signature

Decoding a JWT tells you what it claims; verifying it tells you whether to believe those claims. Verification recomputes the signature from the header and payload using a key and checks that it matches. There are two families of algorithms, and they use different kinds of key:

  • HMAC (HS256, HS384, HS512): a symmetric scheme. The same shared secret both signs and verifies. Provide that secret to verify.
  • RSA and ECDSA (RS256, PS256, ES256 and friends): asymmetric schemes. A private key signs and a public key verifies. Provide the PEM-encoded public key to verify — you never need the private key just to check a token.

This tool detects the algorithm from the header automatically and verifies entirely in your browser using the Web Crypto API, so neither the token nor the key is ever uploaded.

Reading the standard claims

A handful of claim names are standardised (they are called "registered claims"). The tool labels them and converts the time-based ones from raw Unix timestamps into your local time, with a plain-language status so you can see at a glance whether a token is active, expired or not yet valid:

  • exp — expiration time: after this moment the token should be rejected.
  • nbf — not before: the token is invalid until this moment.
  • iat — issued at: when the token was created.
  • iss — issuer: who created the token.
  • sub — subject: who or what the token is about (often a user ID).
  • aud — audience: who the token is intended for.
  • jti — a unique identifier for the token.

Frequently asked questions

Is my token or key sent anywhere?
No. Decoding and signature verification run entirely in your browser using the Web Crypto API. The token, secret and public key never leave your device, so it is safe to inspect production tokens.
Which signing algorithms can it verify?
HMAC (HS256, HS384, HS512) with a shared secret, and RSA (RS and PS variants) and ECDSA (ES256, ES384) with a PEM-encoded public key. The algorithm is detected automatically from the token header.
Is a JWT encrypted?
No. A standard signed JWT is only encoded, not encrypted — anyone can read its header and payload. The signature proves the token has not been altered, but it does not hide the contents, so never store secrets in the payload.
Do I need the private key to verify an RS256 token?
No. Asymmetric algorithms verify with the public key. You only need the private key to create (sign) a token, never to check one.
Why does my token show as expired?
The exp claim is in the past relative to your device clock. The tool converts exp, nbf and iat to your local time and shows a status so you can confirm the token's validity window at a glance.
What is the difference between HS256 and RS256?
HS256 is symmetric: one shared secret both signs and verifies, which is simplest when the same party does both. RS256 is asymmetric: a private key signs and a public key verifies, which lets many parties verify tokens without being able to forge them.
Can I edit the payload and re-sign the token?
This tool is read-only: it decodes and verifies but does not create or re-sign tokens. That keeps it focused and avoids handling private signing keys.