JWT Decoder
A free tool by DeepRit, a Google Ads agency that does PPC and nothing else. We build and run Google Ads accounts so every click is accounted for. Book a free audit call
Free JWT decoder. Read a JSON Web Token's header and payload, see when it expires, and verify HS256 signatures, without the token leaving your browser.
- Algorithm
- 0
- Issued
- 0
- Expires
- 0
- Status
- 0
Free, no sign-up. Runs in your browser: nothing you type is uploaded or saved.
How to use the JWT decoder
Paste a JSON Web Token (with or without "Bearer " in front). The JWT decoder instantly shows:
- The payload: the claims inside the token, formatted as readable JSON.
- The header: the signing algorithm and token type.
- Algorithm, issued and expires: with dates shown in your local time.
- Status: whether the token has expired, isn't valid yet, or has no expiry.
To verify the signature of an HS256, HS384 or HS512 token, enter the secret it was signed with. The JWT decoder checks it with your browser's Web Crypto and tells you whether the signature is valid.
The token never leaves your browser. That matters: many online JWT tools send tokens to a server, and a token is a key to someone's account.
What a JWT is
A JSON Web Token (JWT, often pronounced "jot") is a compact way to pass information between systems, defined in RFC 7519. It's most often used for logins: after you sign in, the server gives your browser or app a token, which it sends with every request to prove who you are.
A JWT has three parts, separated by dots:
header.payload.signature
- Header: JSON describing the token, usually the algorithm (
alg) and type (typ). - Payload: JSON with the claims: who the token is about, who issued it, when it expires and anything else the app needs.
- Signature: proof that the header and payload haven't been changed, made with a secret or a private key.
The header and payload are Base64URL-encoded JSON: a URL-safe version of Base64. The Base64 encoder and decoder can decode them by hand, but the JWT decoder does all three parts at once.
A JWT is encoded, not encrypted
Anyone who has a JWT can read its payload, exactly as this decoder does. The signature stops people changing the token, but it doesn't stop them reading it. So:
- Never put secrets in a JWT payload: no passwords, no card numbers, no private data that the user shouldn't see.
- Treat tokens like passwords: anyone with a valid token can act as that user until it expires.
- Don't paste live production tokens into websites that upload them. This JWT decoder doesn't, but many do.
(Encrypted JWTs, called JWE, have five parts instead of three and can only be read with the key. The JWT decoder recognises them and tells you.)
Common claims
| Claim | Name | Meaning |
|---|---|---|
iss |
Issuer | Who created the token |
sub |
Subject | Who the token is about, usually a user ID |
aud |
Audience | Who the token is meant for |
exp |
Expiration time | When the token stops being valid |
nbf |
Not before | When the token starts being valid |
iat |
Issued at | When the token was created |
jti |
JWT ID | A unique ID for the token |
Times are Unix timestamps in seconds. The JWT decoder converts exp, nbf and iat into readable dates; for other timestamps, the Unix timestamp converter helps.
Signing algorithms
HMAC: HS256, HS384, HS512
The token is signed with a shared secret that both the issuer and the checker know. Enter that secret in the JWT decoder to verify the signature. The classic example token on this page is signed with the secret your-256-bit-secret; try it and you'll see "Signature verified".
RSA and ECDSA: RS256, ES256 and others
The token is signed with a private key and checked with the matching public key, often published by the issuer at a /.well-known/jwks.json address. That lets anyone verify a token without being able to create one. The JWT decoder decodes these tokens and reminds you to verify them with the issuer's public key in your own code.
"none"
A token with "alg": "none" has no signature at all. Accepting such tokens has caused serious security holes; the JWT decoder flags them in red. Your server should only accept the algorithms it expects.
Debugging with a JWT decoder
Common problems the JWT decoder helps you spot:
- "Token expired" errors: check
expagainst the current time. - Clock differences: a token issued a few seconds in the future (
nbforiat) can be rejected by a server whose clock is behind. - Wrong audience or issuer: check
audandissmatch what your API expects. - Missing claims: roles or permissions your app needs aren't in the payload.
- Invalid signature: the secret or key doesn't match, or the token was modified.
- Extra quotes or spaces when the token is copied from logs. The decoder trims spaces and a leading "Bearer ".
Good practice for JWTs
- Keep access tokens short-lived: minutes to an hour, with refresh tokens for longer sessions.
- Always check
exp, and checkaudandisstoo. - Use strong secrets for HMAC: at least 256 random bits. The password generator can make one.
- Store tokens carefully in browsers: HttpOnly cookies protect tokens from scripts better than local storage.
- Pin the algorithm on your server; never let the token choose.
Related developer tools
- JSON formatter: validate and format JSON.
- Hash generator: SHA-256 and other hashes.
- UUID generator: unique IDs for the
jticlaim. - URL encoder and decoder: for tokens passed in URLs.
Where to find a JWT
To debug a login problem, you first need the token:
- In the browser: open the developer tools, go to the Network tab, select a request to your API, and look for the Authorization header ("Bearer eyJ…"). Tokens may also be in cookies or local storage under the Application (or Storage) tab.
- In mobile apps: in your app's debug logs, or by inspecting requests with a proxy tool during development.
- In API tools: in the authorization settings of tools like Postman.
JWTs always start with "eyJ", because that's how {" looks when Base64URL-encoded.
Refresh tokens and access tokens
Many systems use two tokens:
- An access token, often a short-lived JWT (minutes to an hour), sent with every request.
- A refresh token, longer-lived and stored securely, used only to get a new access token when the old one expires.
If users are being logged out unexpectedly, decode the access token to check its expiry, then check that the app is using the refresh token correctly.
Custom claims
Besides the standard claims, apps add their own: roles, permissions, a tenant or organisation ID, an email address. Keep custom claims small (every request carries the token) and never include anything secret. If a claim name might clash with another system's, give it a unique prefix or a full URL as its name, which the JWT standard recommends for public claims.
Decoding JWTs safely
A few habits keep debugging safe: use tokens from development or staging environments where possible; never share production tokens in chat, tickets or screenshots; revoke or rotate any token you've exposed by mistake; and remember that anyone with a valid token can use it until it expires.
JWT vs session cookies
JWTs aren't the only way to keep users signed in. Traditional session cookies store a random ID that the server looks up, which is simpler to revoke. JWTs suit systems where many services need to check identity without sharing a session store. Both are secure when used carefully; the choice depends on your architecture.
A worked example
A bakery's online ordering app starts logging customers out every few minutes. The developer copies a token from the browser's developer tools and pastes it into the JWT decoder. The payload shows exp just five minutes after iat: a configuration change had shortened access tokens from 60 minutes to 5, and the app wasn't refreshing them. The developer also enters the HS256 secret from the staging environment and sees "Signature verified", confirming the tokens come from the right server. One setting later, customers stay signed in.
Need more customers from Google?
This tool is free and runs in your browser. If your business also needs more leads or sales, Google Ads is where people search with their wallet out. That is the whole job of DeepRit: a PPC-only agency that sets up and runs Google Ads accounts so every click is accounted for. You keep full ownership of your account, get a written report every week, and can stop at any time. See our pricing or ask for a free audit.
Frequently asked questions
How do I decode a JWT?
Paste it into the JWT decoder. The header and payload appear as readable JSON, with the expiry time and status.
Is it safe to paste a JWT here?
This JWT decoder works entirely in your browser and never uploads the token. Still, treat live tokens like passwords.
Can anyone read a JWT?
Yes. The payload is only encoded, not encrypted, so never put secrets in it. The signature prevents changes, not reading.
How do I verify a JWT signature?
For HS256, HS384 or HS512 tokens, enter the shared secret. For RS256 or ES256 tokens, verify with the issuer's public key in your code.
Why is my JWT expired?
Its exp claim is in the past. The decoder shows the exact expiry time in your local time.
Is the JWT decoder free?
Yes. It's free with no sign-up, and tokens never leave your browser.
Free PPC audit
See where your ad budget leaks.
We look at your Google Ads account before the call, then walk you through what we'd fix first, in dollars. No obligation, no hard sell.