← All Tools

JWT Decoder

Decode and analyze JSON Web Tokens for security issues and debugging.

Sign a JWT (HMAC)

Build and sign a JWT with a pasted HMAC secret. All signing happens locally in your browser.

JWT Reference

Common Claims

  • iss - Issuer
  • sub - Subject
  • aud - Audience
  • exp - Expiration Time
  • nbf - Not Before
  • iat - Issued At
  • jti - JWT ID

Algorithms

  • HS256 - HMAC SHA-256
  • HS384 - HMAC SHA-384
  • HS512 - HMAC SHA-512
  • RS256 - RSA SHA-256
  • RS384 - RSA SHA-384
  • RS512 - RSA SHA-512
  • ES256 - ECDSA SHA-256

Security Best Practices

  • Always verify signatures server-side
  • Use strong algorithms (RS256, ES256)
  • Set appropriate expiration times
  • Validate all claims
  • Never store sensitive data in JWTs
  • Use HTTPS for token transmission

Common Vulnerabilities

  • alg: none - Algorithm bypass
  • Weak secrets for HMAC
  • Missing expiration validation
  • Improper audience validation
  • Key confusion attacks
  • Token leakage in logs/URLs

How to decode a JWT

  1. Copy the token, for example from an Authorization: Bearer eyJhbGciOi... header in your browser’s developer tools. Copy only the token, without the word Bearer.
  2. Paste it into the box above. A JWT has three Base64URL parts separated by dots; the first usually starts with eyJ. Press Load Sample to try one.
  3. Press Decode Token. Decoding runs in your browser.
  4. To check the signature, use Verify Signature. For an HMAC token (HS256/384/512) paste the shared secret; for an asymmetric token (RS256/384/512, PS256/384/512, ES256/384/512) paste the issuer’s public key as PEM or JWK. Verification happens in your browser — nothing is sent.

Reading the decoded token

Header. The alg field tells you how the token is signed, for example {"alg": "RS256", "typ": "JWT", "kid": "2024-01"}. A token with "alg": "none" has no signature at all; an API that accepts it can be bypassed.

Payload. The claims: who issued the token (iss), who it is about (sub), who it is for (aud), and the times iat, nbf and exp. The claim analysis turns those Unix timestamps into dates and lists scopes, roles or permissions when the token has them.

Status and security notes. “Token Expired” means exp is in the past. “No expiration claim” means the token stays usable until the signing key changes. A note on HS algorithms is a reminder that the secret must be long and random, because a weak HMAC secret can be brute-forced offline from any captured token.

Signature. Shown raw. “Token Decoded Successfully” only means the token could be parsed; it does not mean the signature is valid.

Frequently asked questions

Is it safe to paste a JWT into an online decoder?

On this page the token is decoded by JavaScript in your browser and is not sent to our server. Still, a JWT is a bearer credential: anyone who has a valid one can use it until it expires. Prefer expired or test tokens, and never paste production tokens into a decoder you cannot check. To strip tokens from logs before sharing them, use the log redactor.

Can a JWT be decoded without the secret key?

Yes. The header and payload are only Base64URL-encoded, not encrypted, so anyone can read them. The secret or public key is needed to verify the signature, not to read the claims. That is why a JWT should never carry passwords or other secrets.

Does this tool verify the JWT signature?

Yes, entirely in your browser. For HMAC tokens (HS256/384/512) paste the shared secret. For asymmetric tokens (RS256/384/512, PS256/384/512, ES256/384/512) paste the issuer’s public key as a PEM block (-----BEGIN PUBLIC KEY-----) or a JWK. The verification uses the Web Crypto API; nothing leaves the page.

How do I check when a JWT expires?

Look at the exp claim. It is a Unix timestamp in seconds, for example 1767225600 is 2026-01-01 00:00 UTC. The decoder converts it to a date and marks the token EXPIRED when that time has passed.

What is the difference between a JWT decoder and a JWT validator?

A decoder shows what the token says. A validator decides whether to trust it: it checks the signature, exp, nbf, iss and aud. Your API must always validate. To compute an HMAC by hand, use the HMAC generator.