← All tools

JWT Decoder

Decode a JSON Web Token to inspect its header and payload. Nothing leaves your browser.

Free tool No account
Input
Output

✓ HS256 token

Ready155 in · 298 outProcessed locally · No upload
Enjoying JWT Decoder?Your review and ideas shape what we build next.

Review JWT Decoder

Please don't include file contents or passwords.

About the JWT Decoder

Paste a JSON Web Token to read its header and payload, see when it was issued and when it expires in plain words, and get a warning if it's expired, not valid yet or unsigned. Add the secret or public key to check that the signature is real. Everything happens in your browser.

How to use it

  1. Paste the token, with or without the “Bearer ” prefix.
  2. Read the header, the payload and the times: issued, valid from and expires, each with “… ago” or “in …”.
  3. Check the status line for warnings such as Expired or alg none.
  4. To verify, paste the secret (HS256/384/512) or the public key as PEM or JWK (RS, PS or ES) in Verify the signature.

Tip: Decoding is not verifying: anyone can make a token that decodes to anything. Trust its contents only after the signature checks out with the right key.

The three parts of a JWT

A JWT looks like xxxxx.yyyyy.zzzzz: three Base64URL parts separated by dots.

Header
Which algorithm signed it (alg, such as HS256 or RS256) and the type (typ: JWT).
Payload
The claims: who the token is about (sub), who issued it (iss), who it's for (aud), when it expires (exp) and any custom data such as roles.
Signature
Made from the header and payload with a secret or a private key. Change one letter of the payload and the signature no longer matches.

Reading the time claims

The times are Unix timestamps (seconds since 1 January 1970). The decoder shows each one as a date and time in UTC and as “in 2 hours” or “3 days ago”.

iat (issued at)
When the token was made.
nbf (not before)
The token isn't valid until this time.
exp (expires)
After this time the token must be refused. Short lifetimes (minutes to hours) limit the damage if a token leaks.

Verifying the signature

Verification uses your browser's built-in cryptography, so secrets and keys never leave your device. A “does NOT match” result means the token was changed or the key is wrong.

HS256, HS384, HS512
Signed with a shared secret. Paste the same secret your server uses.
RS256, PS256 and the 384/512 versions
Signed with an RSA private key. Paste the public key as a PEM block (-----BEGIN PUBLIC KEY-----) or as a JWK.
ES256, ES384, ES512
Signed with an elliptic-curve key. Paste the public key as PEM or JWK.

Security warnings explained

alg: none
The token isn't signed at all. A server that accepts it lets anyone write their own token.
Expired / not valid yet
The current time is outside exp or nbf; a correct server refuses the token.
Encrypted token (JWE)
A token with five parts is encrypted, not just signed; its payload can only be read with the private key.

Common claims reference

iss (issuer)
Who made the token, such as https://accounts.example.com.
sub (subject)
Who the token is about, usually a user ID.
aud (audience)
Which app or API the token is for. An API should refuse tokens meant for another audience.
exp, nbf, iat
Expiry, not-before and issued-at times, shown as dates by the decoder.
jti (JWT ID)
A unique ID for the token, used to block a token before it expires.
scope or roles
Custom claims listing what the token allows.

HS256 vs RS256

HS256 uses one shared secret to sign and to check, so every service that checks tokens could also make them. It's simple and fine inside a single app.

RS256 and ES256 sign with a private key and check with a public key. Only the issuer can make tokens, while any service can check them with the public key, often published as a JWKS. This is what most sign-in providers use.

Tips and tricks

Debug a 401 error

Paste the token your app sends: an expired exp or a wrong aud is the usual cause.

Copy from the Authorization header

Paste “Bearer eyJ…” as it is; the prefix is removed for you.

Never store secrets in the payload

The payload is only encoded, not encrypted; anyone with the token can read it.

Check the algorithm

If a token you expect to be RS256 says HS256 or none, something is wrong on the server.

Use test tokens

Treat live tokens like passwords; decode expired or test tokens when you can.

Read one part on its own

Each part is URL-safe Base64, which the Base64 tool can decode too.

Questions

Is it safe to paste a real token here?

Decoding and verifying happen in your browser and nothing is sent anywhere, but treat live tokens like passwords and prefer expired or test tokens.

Can this tool verify a JWT signature?

Yes. Paste the secret for HS256/384/512, or the public key (PEM or JWK) for RS, PS and ES tokens, and the signature is checked on your device.

How do I know if a JWT has expired?

Look at exp in the times list: the decoder shows the date and says “… ago” and Expired if it's in the past.

Can I decode a JWT without the secret?

Yes. The header and payload are only Base64URL-encoded, so anyone can read them. The secret is only needed to check the signature.

What does alg none mean?

The token has no signature. Servers must never accept it.

What's the difference between HS256 and RS256?

HS256 signs and checks with one shared secret; RS256 signs with a private key and checks with a public key, so checking services can't create tokens.

Where should a web app keep a JWT?

Many apps keep it in an HttpOnly, Secure cookie so page scripts can't read it, which protects it from cross-site scripting. Whatever you choose, keep tokens short-lived.

Is my data uploaded?

No. The tool runs in your browser; what you paste or open never leaves your device and nothing is stored on a server.

Related tools

Updated