Black Friday: 50% off every paid plan with code BF50. Ends 5 December.

See prices

Free tool

JWT decoder, header, payload, expiry.

Paste a JSON Web Token to see its header and payload as formatted JSON and every claim explained, with expiry shown in your own time zone and how long is left. Decoding does not check the signature, so a decoded token is not proof that it is genuine. To check it, add the secret or public key: HS, RS, PS, ES and EdDSA all work. The token and key never leave this page.

Need a custom tool, app or website? Contact us 
Token

Check the signature

Decoding needs no key. To check that the token is genuine, give the key it was signed with. Algorithm: none yet.

HS256 to HS512, RS, PS and ES (256 to 512) and EdDSA. Keys as PEM, a certificate, a JWK or a JWKS (picked by kid).

Decoded and checked in your browser with its built-in Web Crypto. The token and the key are never sent anywhere or saved.

What a JWT is

Three parts, dot separated.

01 / Header

How it was signed

Usually the algorithm (alg) and the type (typ).

02 / Payload

The claims

Who it is about (sub), who issued it (iss), when it expires (exp), and anything else the issuer added.

03 / Signature

Proof, if checked

Only the secret or the public key can check it. Add one in the side panel to check it here.

Guide

How to decode a JWT, and read what it says.

A JWT decoder turns a JSON Web Token, the long string that starts with eyJ, back into the readable JSON inside it. You see the header, which says how the token was signed, and the payload, which holds the claims: who the token is for, who issued it and when it expires. Decoding needs no key, because the first two parts of a JWT are only encoded, not encrypted. Checking that the token is genuine is a separate step that needs the signing key. This page does it too, but only when you give it the key.

How to use the JWT decoder

  1. Copy the token from your app, a request header or your browser's developer tools.
  2. Paste it into the Token box. "Bearer " or "Authorization: Bearer " at the start is ignored, and so are quotes around it.
  3. The token shows in three colours below the box: the header in pink, the payload in purple and the signature in blue.
  4. Read the two cards: when it expires, counted from now, and whether the signature has been checked.
  5. Read the Header and Payload panels, shown as formatted JSON, and the table under them. Each claim is listed by name with what it means, and times are shown as dates.
  6. To check the signature, paste the secret or public key into the side panel. The card turns green when it matches.
  7. Want to see how it works first? Press Example. It makes a real HS256 token that expires an hour from now, signed with the secret example-secret, which it puts in the key box.

What the three parts are

A JWT is three pieces joined by dots: header.payload.signature. The header and payload are JSON written in base64url, a version of Base64 that swaps + and / for - and _ and drops the = padding so the token is safe in a URL.

Take the header eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9. Decoded, it reads {"alg":"HS256","typ":"JWT"}: the token is a JWT, signed with HS256. That is why almost every JWT starts with eyJ: it is how {" followed by a letter looks in Base64.

The signature is not JSON. It is a value made from the header and the payload with a key. Change one character of the payload and the signature no longer matches.

The standard claims

The JWT standard defines a short list of claim names. Issuers add their own as well, such as name, email or roles, and the table shows those too.

ClaimNameWhat it means
issIssuerWho made the token, often a URL of the login service
subSubjectWho the token is about, usually a user ID
audAudienceWhich app or API should accept it
expExpiresAfter this time the token should be refused
nbfNot beforeBefore this time the token should be refused
iatIssued atWhen the token was made
jtiToken IDA unique ID, so a token can be tracked or blocked

Reading the times

exp, nbf and iat are Unix timestamps: the number of seconds since 1 January 1970, in UTC. The table converts each one to a date in your own time zone, says how long ago or how soon that is, and keeps the raw number under it. Set Show times in to UTC to compare with server logs. The expiry card and labels update every 30 seconds while the page is open.

A quick worked example: if iat is 1760000000 and exp is 1760003600, the gap is 3,600 seconds, so the token lasts 60 minutes. A gap of 86,400 seconds would be one day. The expired label compares exp with your computer's clock, so if your clock is wrong the label will be too.

Signing algorithms you will see

algHow it is signedWhat checks it
HS256HMAC with a shared secretThe same secret, so only servers that hold it
RS256RSA private keyThe matching public key, which can be shared
ES256Elliptic curve private keyThe matching public key
noneNot signedNothing. A server should refuse it.

Why decoding is not verifying

Anyone can write any JSON, encode it and put dots between the parts. A decoded payload that says "role": "admin" proves nothing until the signature has been checked with the right key. Until you add a key, the signature card says Not checked.

The other side of this is that the payload is readable by anyone who has the token. Never put passwords or private data in a JWT payload, and treat a live token like a password, because whoever holds it can usually act as that user until it expires.

Checking the signature

The check runs in your browser with its built-in Web Crypto. Which key you need depends on the alg in the header:

  • HS256, HS384, HS512. The shared secret. Tick The secret is Base64 encoded if your system stores it that way.
  • RS, PS and ES (256, 384, 512) and EdDSA. The public key. Paste it as PEM (-----BEGIN PUBLIC KEY-----, or BEGIN RSA PUBLIC KEY), as an X.509 certificate, as a JWK, or as a whole JWKS from the issuer's /.well-known/jwks.json. With a JWKS, the key whose kid matches the header is used.

Signature verified means the token was signed with that key and has not been changed since. It does not check the issuer, the audience or the expiry for you; read those in the table. A private key is refused, since only the public half is needed and a private key should never be pasted anywhere. Keys are not saved.

When a token will not decode

  • Extra characters. A trailing comma or other text copied with the token breaks the Base64. The message says whether the header or the payload failed. Paste only the token itself.
  • Cut off. Long tokens are easy to copy only in part. A JWT needs at least the header and payload, separated by a dot.
  • Encrypted tokens. An encrypted JWT, called JWE, has five parts instead of three. The page says so and shows its header, but the claims inside cannot be read without the private key of whoever it was made for.
  • Not a JWT at all. Some services hand out random access tokens that look long but have no dots. There is nothing inside them to decode.

To read any other Base64 text, use Base64 decode. To turn a single timestamp into a date, or a date into a timestamp, use the Unix timestamp converter.

Questions

Good to know.

How do I decode a JWT?

Paste it. The header and payload show at once.

Does this verify the signature?

Only when you give it a key. Without one, it decodes and says the signature is not checked. Add the secret for HS256 or the public key for RS256, ES256 and the rest, and it checks it in your browser. Your server should still verify every token itself.

Is it safe to paste a real token?

The token and any key stay in this page and are not sent or saved. Only the time zone setting is remembered. Still, treat live tokens like passwords.

Which key formats can I use?

For HS algorithms, the secret as text or Base64. For the others, a public key as PEM, an X.509 certificate, a JWK, or a JWKS, where the key is picked by the kid in the header.

Why does it say expired?

The exp time is in the past, by your computer's clock.

What does alg none mean?

The token has no signature at all. Servers should reject it.

Can a JWT be decoded without the secret key?

Yes. The header and payload are only Base64 encoded, so anyone can read them. The key is needed only to check the signature or to make a new valid token.

Is a JWT encrypted?

A normal signed JWT is not. Its payload can be read by anyone who has it. Encrypted tokens exist, called JWE, but they have five parts and cannot be read without the key.

Why do all JWTs start with eyJ?

The header is JSON, so it begins with {" and then the first letter of a name like alg, and those characters come out as eyJ in Base64. Seeing eyJ is a good sign that a string is a JWT.

What time zone are exp and iat in?

They are counted in seconds from 1 January 1970 UTC, so they have no time zone of their own. This page shows them as dates in your computer's time zone, or in UTC if you pick that under Show times in.

Listed on

Listed on JustMacAppsMotionShine on Mac App IndexMotionShine on ScrollLaunchMotionShine featured on StartupBaseFeatured on FazierFeatured on Twelve ToolsMotionShine - Featured on Smol Launch