Toolminex

JWT Decoder

Decode JWT tokens to view header and payload data

🔓 JWT Decoder

Decode JWT tokens to view header and payload. Optionally verify the signature with a secret key. All processing happens locally in your browser - no data is sent to any server.

How to decode a JWT

Paste a token and read what's inside. A secret is only needed if you also want to check the signature.

  1. 01

    Paste the token, with or without "Bearer"

    Copy the Authorization header value from your browser's Network tab, Postman or a log line. A leading "Bearer " is stripped before decoding, so you don't need to trim it by hand.

  2. 02

    Decode and read the header and payload

    The tool splits the token at its two dots, base64url-decodes the first two parts and shows them as JSON. The header tells you the algorithm; the payload holds the claims.

  3. 03

    Add the secret only if you want to check the signature

    Decoding needs no key. If the token is HS256, HS384 or HS512 and you know the secret, enter it and press Verify Signature to confirm nothing was changed.

Why every JWT starts with eyJ

A signed JWT is three base64url strings joined by dots: header, payload and signature. Base64url is plain encoding, not encryption, so anyone holding the token can read the first two parts. That's exactly what this decoder does.

The header and payload are JSON objects, and JSON objects start with {". Encode those two characters plus the next one in base64 and you always get eyJ. So if a string starts with eyJ and has two dots, it's almost certainly a JWT. The classic example header, {"alg":"HS256","typ":"JWT"}, encodes to eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.

The registered claims you'll see most

RFC 7519 defines seven short claim names. None is required, but most identity providers use several of them. Anything else in the payload, such as email, role or a tenant ID, is a custom claim set by whoever issued the token.

ClaimNameWhat it holds
issIssuerWho created the token, often your auth server's URL
subSubjectWho it's about, usually a user ID
audAudienceWhich API or app should accept it
expExpiryUnix time in seconds after which it's invalid
nbfNot beforeUnix time before which it's not valid yet
iatIssued atUnix time when it was created
jtiJWT IDA unique ID, used to block replays or revoke one token

The decoder shows exp, nbf and iat as the raw numbers in the token. To read one, paste it into the Unix Timestamp Converter: 1735689600, for example, is 1 January 2025 at 00:00 UTC. If the number has 13 digits, it was written in milliseconds by mistake, and most servers will treat the token as expiring tens of thousands of years from now.

When decoding a token helps

Working out why an API returns 401

Decode the token your app sent and check the aud, iss and exp values against what the API expects. A wrong audience is a frequent cause.

Checking what an identity provider puts in

Auth0, Cognito, Firebase and Supabase all add their own claims. Decoding a real token shows the exact names before you write code that reads them.

Confirming a role or scope change

After changing a user's permissions, decode a fresh token to see whether the new role is in it, or whether the old token is still being used.

Frequently asked questions

No. Only the signature depends on the secret. The header and payload are readable by anyone, which is why you should never put passwords or other secrets in a payload.
No. Decoding and the optional signature check both run in this page with the browser's own atob and Web Crypto functions.
No. It shows the claims as they are and doesn't compare exp with the current time. Convert the exp value with the Unix Timestamp Converter and compare it yourself.
Usually the text isn't three dot-separated parts: quotes copied from JSON, a line break in the middle, or an encrypted JWE token, which has five parts and can't be read without the decryption key.

Related JWT and developer tools

Something not working right?