JWT Decoder

Last updated: March 9, 2026

JWT Decoder Tool

Decode and inspect JSON Web Tokens without sending them to any server. See the header, payload, and verify the token structure. All processing happens in your browser.

What Gets Decoded

  • Header: Algorithm (HS256, RS256) and token type
  • Payload: Claims including user data, expiration, issuer
  • Signature: Displayed but not verified (needs secret key)

Common JWT Claims

  • iss: Issuer (who created the token)
  • sub: Subject (who the token is about)
  • aud: Audience (intended recipient)
  • exp: Expiration timestamp
  • iat: Issued at timestamp
  • nbf: Not before (token not valid before this time)

Security Reminders

  • JWT payload is Base64 encoded, NOT encrypted. Anyone can read it.
  • Never put sensitive data (passwords, SSN) in JWT payload
  • Always verify signatures on the server side
  • Check expiration before trusting a token
  • Use short expiration times (15-60 minutes for access tokens)

What Exactly Is a JWT Decoder and Why Do Developers Keep One Bookmarked?

If you've ever stared at a string that looks like eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV6l4 and had absolutely no idea what's inside it, you've already discovered the problem a JWT Decoder solves. These tokens are Base64Url-encoded, not encrypted — meaning the data inside is readable, just not in any format a human can parse at a glance. A JWT Decoder takes that three-part dot-separated blob and instantly renders the header, payload, and signature as clean JSON you can actually reason about.

The tool lives squarely in the developer utility / social-sharing category because devs constantly paste these tokens into team chats, Slack threads, and bug reports. Being able to decode one on the fly — without setting up a local environment — is genuinely useful during code reviews, debugging sessions, and on-call incidents.

How Does the Three-Part Structure Actually Break Down?

Every JWT has exactly three segments divided by periods. Understanding what each segment contains changes how you use the decoder:

  • Header: Typically contains the algorithm (alg) and token type (typ). You'll usually see "alg": "HS256" or "RS256" here. This tells you how the signature was generated.
  • Payload: The actual claims — who the user is, what they're allowed to do, and when the token expires. Common fields include sub (subject/user ID), exp (expiration timestamp in Unix epoch), iat (issued at), and any custom claims your app adds like role or permissions.
  • Signature: A cryptographic hash of the header and payload. The decoder shows you this segment but cannot verify it without your secret key — and that's an important distinction we'll come back to.

When you paste a token into a JWT Decoder, the tool splits on those periods, Base64Url-decodes the first two segments, and pretty-prints the JSON. That's the entire mechanical process. The reason it matters is that the exp field, for instance, comes out as 1718892000 — a number that means nothing until the decoder converts it to something readable like Mon Jun 20 2025 14:00:00 UTC.

Frequently Asked Questions About JWT Decoder Tools

Is it safe to paste real production tokens into an online JWT Decoder?

Short answer: no, you should not paste tokens containing sensitive user data into a third-party website you don't control. JWTs from production systems often carry PII like email addresses, user IDs, internal role assignments, and session identifiers. Pasting these into any external tool — even a reputable one — creates an unnecessary exposure risk, especially if that page logs requests or has analytics scripts running.

For production debugging, use a local decoder. Most languages have JWT libraries that include decode utilities, and you can run a quick one-liner in Node.js: JSON.parse(Buffer.from(token.split('.')[1], 'base64').toString()). Save the online tool for development tokens and test environments where the data is synthetic.

Does decoding a JWT validate its signature?

No, and this trips up a surprising number of people. Decoding and verifying are two completely different operations. A JWT Decoder reads the contents of the token without checking whether the signature is valid. Anyone can create a JWT with any payload they want — the signature is what prevents tampering in production. If you need to confirm a token is legitimate (i.e., hasn't been forged or altered), you need to verify the signature against your application's secret key or public key, which requires your backend code or a dedicated verification tool that accepts the secret.

What does an expired JWT look like in the decoder?

The payload will contain an exp field with a Unix timestamp. A good JWT Decoder will flag this visually — often with a red label or a human-readable note like "Expired 3 hours ago." If you're troubleshooting a 401 error and the decoded token shows an exp value in the past, that's your culprit. The fix is usually refreshing the token via your auth provider rather than anything server-side.

Can the decoder handle all JWT algorithms?

For decoding purposes, yes — the algorithm only matters for signature verification. Whether your token uses HS256, RS256, ES256, or PS384, the header and payload segments are always Base64Url-encoded JSON. The decoder reads them the same way regardless. Where algorithm choice becomes relevant is during the verification step, which happens in your application code, not in the decoder UI.

What are custom claims and how do I spot them in the payload?

The JWT spec reserves certain claim names — iss, sub, aud, exp, nbf, iat, jti. Anything outside that list is a custom claim your application defined. You might see fields like "org_id": "acme-corp", "plan": "enterprise", or "feature_flags": ["beta_dashboard", "api_v2"]. These are perfectly valid. In a decoder, they show up right alongside the standard fields in the payload JSON — there's no special marking. Context from your application tells you which ones are custom.

Why does the same user sometimes get tokens with different payloads?

Because your auth server generates a new token each time someone authenticates, and the payload can change based on the session context. If a user just elevated their permissions, got added to a new organization, or your backend rotated its claims structure after a deploy, the new token will look different from an older one. Pasting both into a decoder side by side is one of the fastest ways to spot these differences — especially useful when debugging "why does this user see feature X on one device but not another."

Practical Workflow: Using JWT Decoder During an API Debug Session

  1. Grab the token from your network tab (in browser DevTools, look at the Authorization header in any authenticated request — it starts with "Bearer ").
  2. Strip the "Bearer " prefix so you're left with just the three-part token string.
  3. Paste it into the JWT Decoder. Check the exp timestamp first — confirm the token hasn't expired before chasing other bugs.
  4. Look at the sub or user_id field. Cross-reference it against your database to confirm it matches the account you expect.
  5. Check any role or permission claims against what your API endpoint requires. A 403 with a valid, unexpired token almost always points here.
  6. If the token looks correct but requests still fail, the issue is likely signature verification on the server side — the decoder won't catch that, but you've at least ruled out payload problems.

One Thing Most Guides Skip: The "nbf" Claim

Beyond expiration, JWTs can also have a "not before" claim — nbf. This is a Unix timestamp that tells the server "don't accept this token until this point in time." It's used in scenarios where tokens are pre-issued for future access, like a time-locked download link or a scheduled API access window. A token with an nbf value in the future will be rejected even if everything else looks valid. When a JWT Decoder surfaces this field, pay attention to it — especially if you're pre-generating tokens as part of a scheduled task or queued workflow.

When the Decoder Shows Garbled Output

If you paste a token and the decoder returns an error or shows malformed JSON, the most common causes are: accidentally including the "Bearer " prefix, copying only part of the token (these strings wrap across lines in many UIs), or dealing with a token that's been URL-encoded and still has percent-encoded characters. Try copying from the raw request headers view in DevTools rather than from a formatted log file. Decoders also sometimes struggle with JWEs (JSON Web Encryption) — those are encrypted, not just encoded, and look structurally similar to JWTs but cannot be decoded without the private key.

JWT Decoder tools are a small utility with a surprisingly large impact on debugging speed. The key is knowing exactly what they do — decode and display — and equally knowing what they don't do, which is verify. Treat them as a fast read-only window into your token's contents, keep them away from production data, and they'll save you a significant amount of time chasing authentication bugs.

Disclaimer: This article is for general informational and educational purposes only and does not constitute professional, financial, medical, or legal advice. Results from any tool are estimates based on the inputs provided. Always verify important details and consult a qualified professional before making decisions.