TechWeirdoTools

Encoded token

A “Bearer ” prefix is removed automatically.

Verify signature

HMAC secret for HS* tokens, or a public key (PEM or JWK) for RS*, PS*, ES* and EdDSA.

Decoded Waiting

Paste a token to decode it.

No token yet

Paste a JWT or load the sample to see its header, payload and claims.

How to decode a JWT

  1. Paste the token

    Copy it from an Authorization header, cookie or local storage and paste it in. The three parts are colour-coded.

  2. Read the claims

    Timestamps like exp, iat and nbf are converted to dates, and the token is marked valid, expired or not yet valid.

  3. Verify the signature (optional)

    Enter the HMAC secret or the issuer’s public key to confirm the token hasn’t been tampered with.

How a JSON Web Token works

A JWT (RFC 7519) is three Base64URL-encoded parts joined by dots: header.payload.signature. The header names the signing algorithm, the payload carries claims about the user or session, and the signature proves both were issued by someone holding the key.

Registered claims

ClaimNameMeaning
issIssuerWho created and signed the token
subSubjectWho the token is about, usually a user ID
audAudienceWhich service the token is intended for
expExpirationUnix time after which the token must be rejected
nbfNot beforeUnix time before which the token is not valid
iatIssued atUnix time when the token was created
jtiJWT IDUnique identifier, used to prevent replay

Security notes

  • Signed is not encrypted. Anyone can decode a JWT, so never put passwords or secrets in the payload.
  • Always verify on the server with an allow-list of algorithms. Reject alg: none and never let the token choose between HMAC and RSA.
  • Keep HMAC secrets long and random — at least 32 bytes. Generate one with the random hex generator.

Frequently asked questions

Is it safe to paste my JWT here?

Decoding and verification happen entirely in your browser using JavaScript and the Web Crypto API. The token, secret and keys are never sent anywhere. Even so, avoid pasting production tokens that are still valid into any website you don’t control.

Can I decode a JWT without the secret?

Yes. The header and payload are only Base64URL-encoded, not encrypted, so anyone can read them. The secret or public key is only needed to verify that the signature is authentic.

How do I check if a JWT is expired?

Look at the exp claim: it is a Unix timestamp in seconds. This decoder converts it to your local time and shows whether the token is still valid and how long until (or since) it expires.

Which signing algorithms can be verified?

HS256, HS384 and HS512 with a shared secret; RS256/384/512 and PS256/384/512 with an RSA public key; ES256/384/512 with an EC public key; and EdDSA (Ed25519) in browsers that support it. Keys can be PEM (SPKI) or JWK.

What’s the difference between JWT, JWS and JWE?

JWT is the claims format. A JWS is a signed JWT (three parts, readable by anyone). A JWE is an encrypted JWT (five parts) whose payload can only be read with the decryption key. This tool decodes JWS tokens.