🎫

JWT Decoder

Decode JSON Web Tokens instantly. View header, payload, and signature. Debug authentication issues, inspect claims, verify token structure. 100% browser-basedβ€”tokens never sent to server.

πŸ” Instant Decoding πŸ”’ 100% Private πŸ“‹ Copy Components
Paste your token below
πŸ’‘

Sample JWT Token - Click to Try

Test the decoder with this example token:

eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyLCJleHAiOjE3MTYyMzkwMjIsImVtYWlsIjoiam9obmRvZUBleGFtcGxlLmNvbSIsInJvbGUiOiJhZG1pbiJ9.8DPqqWqjN9FULzNkH-7MH7Q1U2Jy4bBc5j8Uw2TXCq0

🎫 JWT Structure

JWT tokens have 3 parts separated by dots (.):

header.payload.signature
  • Header: Algorithm & token type
  • Payload: Claims (user data)
  • Signature: Verification hash

πŸ’‘ Common Claims

  • sub: Subject (user ID)
  • iss: Issuer
  • aud: Audience
  • exp: Expiration time
  • iat: Issued at time
  • nbf: Not before time

JWT Decoder Use Cases

πŸ” Debug JWT Authentication Issues

Getting "Unauthorized 401" errors? Decode your JWT to check if it's expired (exp claim), issued by wrong server (iss), or missing required claims. See exactly what your token contains without server logs.

πŸ‘€ View JWT User Claims

Curious what data your JWT stores? Decode to see user ID (sub), email, roles, permissions. API returning wrong data? Check if your token has correct user info before blaming the backend.

⏰ Check JWT Expiration Time

Token expired? Decode to see exp timestamp. Convert Unix timestamp to readable date. Know exactly when your token expires without making API calls. Perfect for debugging session timeout issues.

πŸ” Inspect OAuth Token Structure

OAuth providers (Google, Auth0, Okta) return JWTs. Decode to see scopes, audience, issuer. Verify you're getting correct permissions and claims from identity provider.

πŸ› οΈ Test API Integration

Building API? Decode JWTs from Postman/curl requests to verify your auth server generates correct tokens. Check algorithm (alg), issuer (iss), and custom claims before deploying.

πŸ“± Mobile App Token Debugging

App login broken? Copy JWT from device storage/network inspector, decode to see if token format is correct, claims are present, and signature exists. Faster than backend debugging.

Understanding JWT Tokens

How JWT Authentication Works

  1. User logs in with credentials (email/password)
  2. Server verifies credentials and generates JWT
  3. JWT contains user data (claims) and signature
  4. Client stores JWT (localStorage, cookies)
  5. Client sends JWT in Authorization header for API requests
  6. Server verifies signature and grants access

Important Security Notes

  • ⚠️ JWT payload is NOT encrypted - anyone can decode it
  • βœ… Don't store sensitive data in JWT (passwords, credit cards)
  • βœ… Signature prevents tampering - can't modify without secret key
  • βœ… Always use HTTPS to prevent token interception
  • βœ… Set short expiration (exp) for security

How to Decode a JWT

  1. Paste the token. A JWT is three base64url-encoded segments separated by dots: header.payload.signature. Paste the whole string exactly as your API returned it.
  2. Read the decoded output. The tool splits and decodes the header (algorithm and token type) and the payload (the claims β€” user ID, expiry, scopes) into readable JSON.
  3. Check the timestamps. Registered claims like exp, iat, and nbf are Unix timestamps; the decoder shows their human-readable equivalents so you can immediately see whether a token has expired.

What's Actually Inside a JWT

A JSON Web Token (RFC 7519) is not encrypted β€” it's merely encoded. Anyone who holds a token can read its contents; that's by design. What the signature provides is integrity: the third segment is a cryptographic signature (typically HMAC-SHA256 or RSA) computed over the first two, so a server can verify the claims weren't tampered with. This distinction matters constantly in debugging: decoding requires no secret, verifying does.

The header declares the signing algorithm ("alg": "HS256" or "RS256" in most real systems). The payload carries claims β€” registered ones like iss (issuer), sub (subject), aud (audience), and exp (expiry), plus any custom claims your application adds, such as roles or a tenant ID. Because the payload is readable by anyone, it must never contain secrets: no passwords, no API keys, no personal data you wouldn't put in a cookie.

Debugging Auth Problems with a Decoder

A "401 Unauthorized" that makes no sense β€” decode the token you're actually sending. Nine times out of ten the exp claim reveals it expired, or the aud doesn't match the API you're calling.

Missing permissions β€” check whether the expected role or scope claim is present in the payload. If it isn't, the problem lies in token issuance (your identity provider's configuration), not in the API that's rejecting the request.

Clock skew β€” an nbf (not-before) claim a few seconds in the future, produced by a server whose clock runs ahead, makes freshly issued tokens invalid. The decoded timestamps make this visible instantly. Use our Timestamp Converter to cross-check any Unix time by hand.

Frequently Asked Questions

Is it safe to paste a real token here?

Decoding happens entirely in your browser; the token is never transmitted or stored. Still, treat production tokens like passwords as a matter of habit β€” for live systems, prefer decoding short-lived tokens from a test account.

Does this tool verify the signature?

No β€” it decodes. Signature verification requires the signing secret (HS256) or the issuer's public key (RS256), which belongs on your server, not in a browser tool. Never treat a decoded token as authenticated.

Why does my token fail to decode?

Check that you copied all three dot-separated segments with no line breaks or trailing whitespace, and that it's actually a JWT β€” opaque OAuth access tokens from some providers (GitHub, for example) are random strings, not JWTs, and cannot be decoded.

What is base64url, and why not plain Base64?

Base64url replaces + and / with - and _ and drops the padding so tokens survive URLs and HTTP headers unmodified. It's why pasting a JWT into a generic Base64 decoder sometimes fails on certain characters.

How long should JWTs live?

Common practice is 5–60 minutes for access tokens, paired with longer-lived refresh tokens. Long-lived access tokens are risky precisely because a JWT can't be revoked server-side without extra infrastructure like a denylist.

Copied!