Skip to content
ToolMug

JWT Decoder

Paste a JSON Web Token to see its header and payload, check whether it has expired, and verify the signature with a secret or public key. Everything runs locally, so production tokens are never sent to a server.

Runs in your browser — nothing you enter is uploaded

Decoding does not verify the signature. Anyone can create a token with any claims.

How to use

  1. Paste the token — with or without the "Bearer " prefix. The three parts are colour-coded.
  2. Read the decoded header and payload. The iat, nbf and exp claims are shown as dates with a relative time.
  3. To verify the signature, enter the shared secret for HS256/384/512, or paste the public key (PEM or JWK) for RS, PS, ES and EdDSA tokens.
  4. Copy the decoded JSON if you need it elsewhere.

Options explained

Header
Metadata about the token, usually alg (the signing algorithm) and typ. A kid field tells you which key signed it.
Payload
The claims. Registered ones include sub (subject), iss (issuer), aud (audience), iat (issued at), nbf (not before) and exp (expiry), all times in Unix seconds.
Signature
Proves the header and payload were not changed. Checking it needs the secret (HMAC) or the issuer's public key (RSA, ECDSA, EdDSA).
Secret is Base64
Some services store HMAC secrets Base64-encoded. Tick this if the secret you have is the encoded form.

Common claims

Claim Meaning Example
sub Who the token is about (user ID) "1234567890"
iss Who issued it "https://accounts.example.com"
aud Who it is intended for "my-api"
exp Expiry time, Unix seconds 1790427600
iat Issued at, Unix seconds 1790424000
nbf Not valid before, Unix seconds 1790424000
jti Unique token ID, used to prevent replay "a1b2c3"

Example

The token eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c decodes to the header {"alg":"HS256","typ":"JWT"} and a payload with sub, name and iat (18 January 2018). With the secret your-256-bit-secret the signature verifies.

Frequently asked questions

Is it safe to paste a production JWT here?

The token is decoded by JavaScript in your browser and is not uploaded or logged. Still, treat access tokens like passwords — anyone who holds a valid token can use it until it expires.

Does decoding a JWT prove it is genuine?

No. The header and payload are only Base64URL-encoded, so anyone can read or forge them. Only a successful signature check with the right key shows the token was issued by the expected party.

Why does verification fail with the correct secret?

Check whether the secret is Base64-encoded, whether there is a trailing space or newline, and that the algorithm in the header matches what the issuer uses. Any change to the token, even one character, also breaks the signature.

What does "alg none" mean?

The token claims to be unsigned. Servers must reject such tokens unless they explicitly expect them; accepting them has caused real authentication bypasses.

How do I get the public key for RS256 tokens?

Identity providers publish their keys as a JWKS, usually at /.well-known/jwks.json. Copy the key whose kid matches the token header and paste it here as JWK.

Privacy

This tool runs entirely in your browser. Your files and text are processed on your device and are never uploaded to our servers.

Related tools