Tabwrench tools Small tools that run in your browser. No sign-up, no upload.
Tools / Encode / decode / JWT decoder

JWT decoder

Paste a JSON Web Token to read its header and payload, see when it expires, and check an HMAC signature against your secret.

Runs in your browser. Nothing you paste leaves this page.
Token

Verify signature (HS256, HS384, HS512)

The secret stays on this page. RS256, ES256 and other public-key signatures are not checked here.

What is inside a JWT

A JSON Web Token is three Base64URL strings joined by dots. The first two are JSON, and the third is a signature over the first two.

PartHoldsExample
HeaderSigning algorithm and token type{"alg":"HS256","typ":"JWT"}
PayloadClaims about the user and the token{"sub":"user-4821","exp":1795340968}
SignatureProof that header and payload were not changedHMAC or public-key signature bytes

The header and payload are encoded, not encrypted. Anyone holding the token can read them, so a JWT must never carry passwords or other secrets.

The registered claims

  • exp: expiry time, in seconds since 1 January 1970 UTC. After this the token must be rejected.
  • nbf: not before. The token is not valid until this time.
  • iat: when the token was issued.
  • iss, sub, aud: who issued it, who it is about, and which service it is meant for.
  • jti: a unique ID, used to revoke or de-duplicate tokens.

The page converts the three time claims to dates and compares them with your computer's clock.

Decoding is not verifying

Reading a token tells you what it claims. Only the signature tells you whether to believe it. For HMAC algorithms (HS256, HS384, HS512) the same secret signs and verifies, so you can check it here by typing the secret. Public-key algorithms such as RS256 need the issuer's public key and are not checked on this page.

Questions

Is it safe to paste a production token?

The token is decoded by JavaScript in this tab and is not sent anywhere. Even so, treat a live token like a password: prefer an expired one for debugging.

Why does it say the signature does not match?

Usually the secret is wrong, has a trailing space or newline, or is stored as Base64 and needs the “Secret is Base64” option.

What does alg “none” mean?

The token has no signature. A server that accepts such tokens can be given any payload, so they should be rejected.

Related tools