JWT Decoder

Base64URL-decode header and payload to inspect claims. Signature verification stays in your auth stack.

Tool input stays in your browser. The site may use cookies for ads.
🔒 All decoding happens in your browser. No data is sent to any server.

Decoding is not verification

A JWT is three Base64URL segments separated by dots: header, payload, signature. Anyone can decode the first two parts — they are not encrypted. The signature proves the token was produced by someone who holds the signing key only if you verify it with the right algorithm and key material.

This page shows you what claims say. Treat them as untrusted until your backend verifies the signature and checks exp, nbf, audience, and issuer.

Worked example

A truncated teaching token (signature omitted) might decode like:

// Header
{ "alg": "HS256", "typ": "JWT" }

// Payload
{
  "sub": "user_42",
  "iat": 1731801600,
  "exp": 1731805200,
  "role": "editor"
}

// Signature = HMAC-SHA256(base64url(header) + "." + base64url(payload), secret)
// This tool does not recompute or validate that third segment.

The alg: none class of bugs

If a verifier trusts the token's own alg header without an allowlist, an attacker can craft a payload, set alg to none, and omit a real signature. Modern libraries harden this; legacy code and custom parsers still get it wrong. Pin allowed algorithms in config.

Where tokens should (and should not) live

  • Prefer short-lived access tokens in memory; refresh via httpOnly, Secure, SameSite cookies when building first-party web apps.
  • Avoid long-lived JWTs in localStorage if XSS is in scope — any script can exfiltrate them.
  • Never paste production secrets or session tokens into third-party tools when a local decoder or your IdP dashboard will do.

Frequently Asked Questions

Does this tool verify the signature?

No. It Base64URL-decodes the header and payload so you can read claims. Cryptographic verification needs the correct HMAC secret or asymmetric public key in your auth stack.

Why is alg: none dangerous?

Some libraries historically accepted tokens with alg set to none and an empty signature. An attacker can strip the signature, set alg to none, and forge claims if verification is buggy. Always reject unexpected algorithms server-side.

HS256 vs RS256 — which am I looking at?

Check the header alg claim. HS256 is symmetric (shared secret). RS256/ES256 are asymmetric (private key signs, public key verifies). Never verify an HS256 token with an RS256 public key treated as a shared secret.

Why does exp look valid locally but fail on the server?

Servers often allow a few seconds of clock skew for iat/nbf/exp. Your laptop clock, the IdP clock, and the API clock can disagree. Also confirm you are reading seconds (not milliseconds) Unix time.

Related Tools