devtools.cihat.dev

JWT decode online, locally

Paste a JSON Web Token to decode it: the algorithm, the claims and when it expires. Decoding happens on this page, in your browser; the token is never sent anywhere.

A JWT is a key to an account. Anyone holding a live token can act as its owner until it expires. This page decodes it in your browser and sends it nowhere, but treat it like a password: prefer an expired or test token, and never paste one into a site you do not trust.

Paste a token and its header, payload and dates appear here.

How to use it

  1. Paste the token. A leading “Bearer ” copied from an Authorization header is removed for you.
  2. Read the expiry, issue time and other claims as dates and plain values; the full header and payload appear as JSON below.
  3. Copy the payload JSON if you need it elsewhere.

How a JWT is built

A JWT (RFC 7519) is three base64url parts joined by dots: header.payload.signature. The header and the payload are JSON objects; the signature is bytes. Base64url is Base64 with - and _ instead of + and /, and with the = padding dropped (RFC 7515), so the token can sit in a URL or a header unchanged.

Decoding is only Base64 in reverse. The header {"alg":"HS256","typ":"JWT"} always encodes to eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9, which is why so many tokens start with eyJ: it is the Base64 of {". You can decode any single part by hand with the Base64 decoder; this page does all three and reads the dates for you.

The registered claims

RFC 7519, section 4.1, defines seven claim names. All are optional; an API decides which it requires. The three dates are NumericDate values: seconds since 1 January 1970, 00:00 UTC, not milliseconds.

ClaimMeaningExample
issIssuer: who created the tokenhttps://auth.example.com
subSubject: who the token is about, often a user IDuser_8412
audAudience: who must accept it; a string or a listapi.example.com
expExpiration time: reject the token on or after this moment1300819380
nbfNot before: reject the token before this moment1300815780
iatIssued at: when it was created1300815780
jtiJWT ID: a unique identifier, used to stop replaysa1b2c3

A worked example

The example in RFC 7519, section 3.1, has the header {"typ":"JWT","alg":"HS256"} and the payload {"iss":"joe","exp":1300819380,"http://example.com/is_root":true}. Pasted here, it shows the algorithm HS256, the issuer joe, and an expiry of 22 March 2011 at 18:43:00 UTC, shown in your own time zone and marked as expired. The third claim is a private one: any name that is not registered is allowed, and a URL keeps it from clashing with someone else’s.

If a server rejects a token that this page says is still valid, check three things: the clock on the server, the nbf date, and the audience. RFC 7519 lets a server allow “some small leeway, usually no more than a few minutes” for clock skew, so a token a few seconds from expiry can go either way.

Decoding is not verifying

Anyone can write a token with any payload. Only checking the signature with the right secret (HS256) or public key (RS256, ES256, PS256) proves the token came from the issuer and was not changed. Do that on your server with a maintained library, never by trusting a decoded payload. That is why the tool reports the signature as present but not checked, even on a valid token: it never asks for your secret, and you should not paste one into a web page.

The JWT Best Current Practices (RFC 8725) require libraries to let the caller fix the allowed algorithms and to reject everything else. A token whose header says "alg":"none" has no signature at all; this page flags it, and a server should refuse it unless it was set up to accept unsigned tokens on purpose.

Common alg values (RFC 7518)
algSigned withVerify with
HS256HMAC with SHA-256 and a shared secretThe same secret
RS256RSA private key, SHA-256The RSA public key
ES256ECDSA, P-256 curve, SHA-256The EC public key
PS256RSA-PSS with SHA-256The RSA public key
noneNothingNothing: treat as untrusted

Encrypted tokens and other limits

A token with five parts instead of three is a JWE (RFC 7516): header, encrypted key, initialisation vector, ciphertext and authentication tag. Only the header can be read; the payload needs the decryption key, so the tool says so instead of showing noise.

The payload of an ordinary JWT is encoded, not encrypted. Never put passwords, personal data you would not show the user, or secrets in it. To read a large payload as a tree, copy it into the JSON viewer; to compare a token’s jti or a user ID with a fresh one, the UUID tool can tell which version an ID is.

Questions people ask

How do I decode a JWT?

Paste the whole token in the box. The header, the payload and the dates appear at once; nothing is sent to a server.

Is it safe to paste my token here?

The page decodes in your browser and sends nothing; you can check the network tab. A live token is still a credential, so prefer an expired or test token, and rotate any token you pasted somewhere you do not trust.

Why is the signature not verified?

The token was decoded, but checking its signature needs the secret or the public key, which this page never asks for. Decoding alone never proves a token is genuine; verify it on your server.

What is a JWT?

A JSON Web Token: a compact, signed set of claims, such as who the user is and when the token expires, that a server can check without a database lookup.

Why does it say the token is encrypted?

A token with five parts is a JWE. Its payload is encrypted and cannot be read without the decryption key.

What time zone are the dates in?

Your device’s. The values in the token are seconds since 1970 in UTC; the tool converts them.

Can I decode a JWT offline?

Yes. Once this page has loaded, decoding works without a connection, because it runs entirely in the page.