Skip to content
cliplimeClipLime

That long token is readable by anyone, so where you paste it matters. Decode a JWT and read it safely

Split a token into its three parts, read the claims and the exp date, and learn the difference between decoding a token and verifying it.

6 min readUpdated October 27, 2026

Skip the readingJWT Decoder: Decode a JSON Web Token and read its claims and dates, with an optional local HS256 signature check.

The quick answer

You have a long string that starts with eyJ, an API keeps answering 401, and you need to know what is inside the token or when it stops working. Paste it into the JWT decoder. It splits the token, shows the header and payload as JSON and turns exp, nbf and iat into dates.

  1. Copy the token. A leading Bearer , a whole Authorization: header, quotes and line breaks are fine, because the decoder strips them.
  2. Paste it into the box. The three parts are colored, and every claim is listed, with a plain explanation for the standard ones.
  3. Read the badge: Expired, Not active yet, Not expired or No expiry set. The line under it says how long ago or how long from now.
  4. Optional, for HS256, HS384 and HS512 tokens only: type the signing secret in the signature section to check the signature. Use a test secret.
JWT DecoderPaste a token to see its header, payload, readable dates and whether it has expired.Open it

Where you paste a token matters

A JWT is a bearer token: whoever holds it can usually use it until it expires, much like a password. Decoding needs no server, because the first two parts are only encoded text, so a page has no reason to send your token anywhere, and a page that does has a copy of it.

To check a decoder, open your browser's developer tools, go to the Network tab, paste a test token and watch: no request should carry it. This decoder runs in your browser and does not send, store or log the token or a secret. Even so, prefer a test or expired token, and treat a live one pasted into a page you did not trust as leaked. Is it safe to upload a PDF to a free website applies the same check to documents.

The three parts of a JWT

A JSON Web Token is three pieces joined by dots: header.payload.signature. This example was signed with the secret demo-secret and expired in 2023, so it is safe to practice on. The badge will say Expired, and the signature check passes when you type the secret:

eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2F1dGguZXhhbXBsZS5jb20iLCJzdWIiOiJ1c2VyXzEwNDIiLCJhdWQiOiJhcGkuZXhhbXBsZS5jb20iLCJpYXQiOjE3MDAwMDAwMDAsIm5iZiI6MTcwMDAwMDAwMCwiZXhwIjoxNzAwMDAzNjAwfQ.NbgZZgo5WcMukX4ayCjaI_rObdQBfAg_OuWl8nqHoh4

PartDecodes toWhat it is for
Header{"alg":"HS256","typ":"JWT"}How the token was signed
PayloadThe claims as JSON: iss, sub, aud, iat, nbf and exp hereWhat the token says
Signature32 bytes of binary data, not textLets a server detect any change

Each part is Base64URL: the Base64 alphabet with - and _ in place of + and /, and no = padding. That is an encoding anyone can undo, not encryption, and it is why most tokens start with eyJ, which is {" followed by a letter in Base64. Base64 encoding and decoding explained shows the mechanics, and the Base64 decoder reads any single part. A token with five parts is an encrypted one (JWE), and only its header can be read without the key.

The standard claims

A claim is one key in the payload. Seven are registered in the JWT standard (RFC 7519), and the decoder explains each one:

ClaimMeaning
issIssuer: who created and signed the token
subSubject: who it is about, often a user ID
audAudience: who it is for, a string or a list
expExpiration: not valid at or after this moment
nbfNot before: not valid until this moment
iatIssued at: when it was created
jtiToken ID: unique to this token

Apps add their own claims, such as a role or an email address. The decoder also explains auth_time, nonce, azp, scope and sid. For a payload with long nested objects, the JSON formatter can re-indent or check it, and format and validate JSON covers what to do when it will not parse.

Reading exp, nbf and iat

These three are a number of seconds since 1 January 1970 UTC, so each is one moment, the same everywhere. In the example, iat is 1700000000 and exp is 1700003600. The difference is 3,600 seconds, so the token lives for one hour: 22:13:20 to 23:13:20 UTC on 14 November 2023, which is 5:13:20 PM to 6:13:20 PM in New York (EST). For other time zones, or a number from a log, use the Unix timestamp converter. A token is expired once the current time is at or after exp.

One trap: a 13 digit value is milliseconds, and JWT does not use milliseconds. Read as seconds, 1700003600000 would be the year 55840. The decoder warns about values that large instead of showing a date.

Decoding is not verifying

Anyone can write a header and a payload that decode perfectly with any claims they like. Only the signature, checked with the right key, separates a genuine token from a forged one. So read a decoder's result like this:

What you seeWhat it showsWhat it does not show
The token decodesThe text is well formedAnything about who made it
Not expiredYour clock is before expThat the token is genuine
Signature matches (HS256, typed secret)That secret signed these exact bytesThat exp, iss and aud are acceptable
alg is noneThe token claims to be unsignedAnything. Never accept it as proof

A server that accepts tokens has to verify the signature with its own key and choose the algorithm itself, because libraries that trusted the token's alg value have accepted forged tokens. It must also check exp, nbf, iss and aud. Use a decoder to understand a token while debugging, never to decide who may do what.

The decoder checks a signature only for HS256, HS384 and HS512, which use a shared secret, and only when you type it. RS256 and ES256 need the issuer's public key, which this page does not take, so it says the signature was not checked. Type only secrets from a test setup: whoever has a production signing secret can mint tokens.

Anyone who holds an HS256 token can test guesses of its secret offline, so a short secret is a real hole. RFC 7518 requires a key at least as long as the hash output, 256 bits for HS256. That is about 40 random characters from a set of 85 to 94 symbols, and make a strong password shows how to get them.

Common errors and what to check

Wording differs between libraries, but the causes do not.

ErrorLikely causeLook at
Token expiredexp has passed, or the checking machine's clock runs aheadThe Expires date. Get a fresh token, because editing exp breaks the signature
Not yet validClock skew: the issuer's clock runs ahead of the checker's by seconds or minutesnbf and iat against your clock. Many libraries allow a few seconds of leeway
Invalid audienceIssued for another API or clientaud against what your service expects
Invalid issuerFrom another environment or tenantiss, character for character, including a trailing slash
Invalid signatureWrong secret, an altered token, or a Base64 secret read as textType the secret and try the Base64 option
Malformed tokenA cut-off copy or a stray characterThe part count: 3 signed, 5 encrypted

Where to go next

To find tokens that leaked into a log file, the pattern \beyJ[\w-]+\.[\w-]+\.[\w-]* matches the three part shape. It is a starting point, so check the hits, and see how to test a regular expression first. HS256 signatures are built on the SHA-256 hash, and how to verify a download with a hash explains what a hash is and what a matching one proves.

Unix Timestamp ConverterTurn any exp, nbf or iat value into a date in any time zone.Open it

Try it yourself

Questions people ask

Can anyone read what is inside a JWT?

Yes. The header and payload are Base64URL text, an encoding with no key, so anyone who holds the token can read them with a JWT decoder. Only a five part JWE is encrypted. Keep private data out of a payload.

What does the exp claim mean in a JWT?

It is the moment the token stops being valid, written as seconds since 1 January 1970 UTC. A token is expired once the current time is at or after it. Turn the number into a date with the Unix timestamp converter.

Is it safe to paste a JWT into an online decoder?

Only if the page decodes in your browser, which you can confirm in the Network tab. A live token works like a password until it expires, so prefer a test token, and treat one pasted into a page you did not trust as leaked.

Does decoding a JWT verify it?

No. Decoding only reads the text. Verifying means checking the signature with the right key, which the decoder does only for HS256, HS384 and HS512 when you type the secret, and even a match does not say whether a token should be trusted.

Can I change the payload of a JWT?

You can edit the JSON and encode it again, but the signature was made from the original header and payload, so a server that verifies the signature will reject the result. That is exactly what the signature is for.

All Data and developer guides Browse all data & developer tools