Skip to contentSkip to the inputSkip to the result

JWT decoder

Read what is inside a JWT

Loading tool

Instructions

JWT decoder

How to use

  1. Paste the whole token.
  2. A leading "Bearer" is fine.
  3. To check the signature, enter the secret for HS tokens or the public key (PEM or JWK) for RS, PS and ES tokens.

Supported input

  • Two or three Base64URL parts separated by dots.
  • Signatures are checked for HS256/384/512, RS256/384/512, PS256/384/512 and ES256/384/512 with the browser's own cryptography (WebCrypto).
  • Neither the token nor the key leaves this device, and the key is not saved or put in the address.

Input example

eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxMjMifQ.x

Result example

{ "alg": "HS256" } · { "sub": "123" }

Troubleshooting

  • Nothing is produced for empty input.
  • Split very long text into parts.

Limitations

  • Without a key the signature is not verified: a readable payload does not prove the token is genuine.
  • An HS secret is used exactly as typed; a Base64-encoded secret is not decoded.
  • Certificates (BEGIN CERTIFICATE) are not read.
  • A token with the "none" algorithm or an empty signature gets a warning.
  • Encrypted JWE tokens cannot be read.

How it works

  • Decodes the header and payload of a JWT to JSON and reads its issue, expiry and not-before times, issuer and audience.
  • With a secret or public key it also checks the signature on this device.

Reading a JWT, and what a valid signature does and does not prove

Typical reasons to open one up

  • An API answers 401 and you want to rule out an expired token or the wrong audience before touching the code
  • You are wiring up a new identity provider and need to see which claims (roles, email, user ID) it actually puts in the token
  • The header carries a kid and you need to know which key in the provider’s JWKS should verify it
  • A webhook arrives with a token signed with a shared secret, and you want to confirm it was really made with that secret

What the three parts hold

A JWT is a header, a payload and a signature joined with dots (RFC 7519 builds on RFC 7515). The first two are JSON written in Base64URL with the trailing = padding removed. The signature covers the exact characters "header.payload", which is why changing even one character of the payload breaks it.

The header names the signing algorithm (alg) and often a type (typ) and key ID (kid). The payload’s registered claims are iss (issuer), sub (subject), aud (audience), exp (expiry), nbf (not before), iat (issued at) and jti (token ID); every one of them is optional, and times are seconds since 1970. The tool lifts iat, exp, nbf, iss, aud and sub into their own rows. jti and any custom claims your provider adds are in the JSON underneath.

Worked example: a fifteen-minute token

  1. 1An HS256 token was signed with a 34-byte test secret. Its header, {"alg":"HS256","typ":"JWT"}, encodes to the 36 characters eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.
  2. 2The payload has iat 1767225600 and exp 1767226500. The tool reads them as Issued 2026-01-01 00:00:00 UTC and Expires 2026-01-01 00:15:00 UTC: 900 seconds, a fifteen-minute lifetime.
  3. 3With the same secret in the key box, the Signature row reads "Valid · signed with this key". Change the last character of the secret from ! to ? and it reads "Invalid".
  4. 4Swap sub from user-42 to admin, re-encode the payload and keep the old signature: Invalid, even with the right secret. Anyone can rewrite the payload; nobody can redo the signature without the key.
  5. 5Signature length depends on the algorithm: HS256 adds 32 bytes, or 43 characters; RS256 with a 2048-bit key adds 256 bytes, or 342 characters; ES256 adds 64 bytes, or 86 characters. That matters if the token rides in a cookie.

What "Valid" leaves for the server to check

A valid signature only says the token was made with that key and has not changed since. A server still has to insist on the algorithm it expects rather than trusting the header (RFC 8725, section 3.1), check exp and nbf against its own clock, and check that iss and aud are the values it expects. RFC 7519 allows a small leeway for clock skew, usually no more than a few minutes. This tool compares iss and aud with nothing and applies no leeway; it shows you the values so you can make those checks yourself.

HS keys have rules too. RFC 7518 requires a key at least as long as the hash output, so 256 bits (32 bytes) for HS256, and RFC 8725 says a human-memorable password must not be used directly as an HMAC key. The tool will happily verify with a short secret, so judging the key’s strength is up to you.

Mistakes that show up in real code

  • Comparing exp with Date.now() in JavaScript. Date.now() is in milliseconds, so exp < Date.now() is always true and every token looks expired; compare with exp × 1000. The opposite slip, an exp written in milliseconds, is flagged by the tool as "looks like milliseconds".
  • Assuming aud is a string. RFC 7519 allows a single string or an array, so a check like aud === "api" rejects tokens that list several audiences. The tool joins an array with commas.
  • Expecting an EdDSA (Ed25519) signature to be checked here. Those tokens decode, but the Signature row says the method cannot be checked.
  • Pasting a five-part token. That is an encrypted JWE, and the tool asks for three parts; only the issuer’s key can open it.

Checked

Frequently asked questions

Is the content of a JWT encrypted?

A normal JWT is only Base64URL-encoded, so anyone holding the token can read the payload. Do not put secrets such as passwords in it.

What are the exp and iat numbers?

Unix time in seconds since 1970-01-01 UTC. An exp of 1760003600 means it expires at 2025-10-09 09:53:20 UTC; the tool shows this as a UTC date and how long until (or since) expiry. When nbf (not before) is still ahead, the status says Not yet valid.

I get a warning that the algorithm is none.

When the header's alg is none or the third part (the signature) is empty, the token is unsigned. Anyone can write one with any content, so a server that accepts it has a security problem.

Is it safe to paste a real token?

Decoding happens only in this browser and the token is not sent anywhere. A valid token still works like a login, so keep it out of screen shares and screenshots.

Can it check whether the signature is valid?

Yes. Enter the secret for HS256, HS384 and HS512 tokens, or a public key starting -----BEGIN PUBLIC KEY----- or a JWK for RS, PS and ES tokens, in Secret or public key; the Signature row then reads Valid or Invalid. The check runs on this device with the browser's WebCrypto, and the key is not saved, put in the address or sent anywhere.