JWT Decoder - Free Online Tool
Read a JWT in three steps
From a token copied out of a request to readable JSON, without installing anything or sending the token anywhere.
- STEP 01
Paste the token
Paste it straight from an Authorization header. A leading “Bearer ” is removed for you.
Line breaks are fine too - STEP 02
Read the claims
See every claim with its value, and dates for exp, iat and nbf in your local time.
Standard claims explained - STEP 03
Copy or download
Copy the header, the payload or both as JSON, or download a .json file.
Raw parts under one click
How to use this JWT decoder
A decoder answers what is inside this token. Whether the token is genuine is a separate check your server makes.
- 1
Copy the whole token
A JWT is three parts joined by two dots. If one part is cut off, the decoder says the format is invalid.
- 2
Check the expiry first
The status line says whether exp has passed, and how long is left. Most “401” bugs start here.
- 3
Read the audience and issuer
Compare aud and iss with what your API expects. A token for another service is a common mix-up.
- 4
Use test tokens where you can
The token never leaves this page, but a live token is still a key. Prefer test or expired tokens.
What a server should check before trusting a JWT
Decoding is the easy part. These four checks, from RFC 8725, are what keep tokens safe.
Verify, then read
Check the signature with the expected key before you use any claim. A decoded token proves nothing on its own.
- Verify on the server
- Use a maintained library
- Reject on any failure
Allow-list the alg
An attacker can change the header's alg, even to “none”. Only accept the algorithms you expect.
- Fixed list of algs
- Never accept “none”
- Match the key type
Check iss and aud
A valid token for another service is still the wrong token. Check who issued it and who it's for.
- iss matches your issuer
- aud includes your API
- sub is a known user
Honour exp and nbf
Reject tokens outside their time window. RFC 7519 allows a small leeway of a few minutes for clock skew.
- exp in the past = reject
- nbf in the future = reject
- Keep leeway small
The three parts of a JWT
A signed JWT is three base64url strings joined by dots: header, payload and signature.
Header
A small JSON object that says how the token is signed, such as alg HS256 or RS256, and often typ JWT.
- alg: signing algorithm
- typ: usually JWT
- kid: which key, if set
Payload
The claims: a JSON object with facts about the user and the token. Anyone holding the token can read it.
- Registered claims
- Your own claims
- Not encrypted
Signature
Made from the header and payload with a key. Only someone with the key can check it, so this tool shows it as-is.
- Covers parts 1 and 2
- Needs the key to check
- Shown, not verified
Encrypted JWTs
An encrypted JWT (JWE) has five parts and can't be read without the key. This decoder reads three-part tokens.
- 5 parts = encrypted
- Needs the private key
- Decode on your server
Where JWTs turn up
The same three parts, read for very different reasons.
API developers
Checking which scopes and audience a token carries when a request is refused.
Login and SSO
OpenID Connect ID tokens are JWTs. The claims say who signed in and for which app.
Mobile apps
Apps keep tokens between launches. Expiry and refresh bugs show up as sudden sign-outs.
QA and support
Reading a test user's token to see which role or tenant it really has.
The seven registered claims
RFC 7519 defines these names. All of them are optional, and times are seconds since 1 January 1970 UTC.
| Claim | Name | What it means |
|---|---|---|
| iss | Issuer | Who issued the token |
| sub | Subject | Who or what the token is about, often a user ID |
| aud | Audience | Who the token is meant for. Anyone else must reject it |
| exp | Expiration time | After this moment the token must not be accepted |
| nbf | Not before | Before this moment the token must not be accepted |
| iat | Issued at | When the token was issued, so you can tell its age |
| jti | JWT ID | A unique ID for the token, which helps stop replays |
Times are seconds
exp, nbf and iat count seconds, not milliseconds. A value with 13 digits is a bug in the issuer.
- 1516239022 = 18 Jan 2018
- Shown here in your local time
- Fractions are allowed
Your own claims
Apps add claims like role, scope or email. They work the same way, but the names are up to the issuer.
- name, email, role
- scope for permissions
- azp and nonce in OpenID
Never put in a payload
A signed JWT is readable by anyone who holds it, as this page shows.
- Passwords or secrets
- Card or bank numbers
- Private personal data
- Anything you'd hide in a URL
Keeping tokens healthy in a live app
Habits that stop token problems before they become support tickets.
- 1
Keep access tokens short
A short exp limits the damage if a token leaks. Pair it with a refresh flow so users stay signed in.
- 2
Rotate signing keys
Plan for key changes from day one. A kid header tells the server which key signed each token.
- 3
Keep tokens out of logs
Logs live long and travel far. Log the jti or the sub, not the whole token.
- 4
Set typ for new token types
RFC 8725 suggests explicit typing so one kind of token can't be passed off as another.
This decoder vs a JWT library vs pasting into a website that uploads
Each has a job. Only one of them can tell you whether a token is genuine.
| Feature | CleverTools decoder | JWT library on your server | Online tool that uploads |
|---|---|---|---|
| Reads header and claims | ✓ Instantly | ✓ Yes | ✓ Yes |
| Token leaves your device | ✓ Never | ✓ Stays on your server | ✗ Yes |
| Verifies the signature | ✗ No, by design | ✓ Its main job | Sometimes |
| Explains standard claims | ✓ In plain English | ✗ No | Varies |
| Setup needed | ✓ None | Code and keys | ✓ None |
| Cost | ✓ Free | ✓ Usually free | Varies |
Need to read a single base64 part by hand? The Base64 Encoder and Decoder handles text, and the Unix Timestamp Converter turns exp and iat into dates.
Pro tips for debugging tokens
What to look at first when a token is refused.
Expired by seconds
A token that expired a moment ago often means the client's or server's clock is off.
Wrong audience
If aud names another API, the token came from the wrong login flow or client.
Check the kid
A kid your server doesn't know usually means the signing keys were rotated.
alg: none
Treat a token with alg none as a red flag. Servers should refuse it outright.
Millisecond times
A 13-digit exp is in milliseconds. The token looks valid for thousands of years.
Bearer prefix
Paste the header value as-is. This decoder strips “Bearer ” before decoding.
Use expired tokens
For screenshots and bug reports, an expired test token shows the same structure safely.
Don't trust kid or jku
RFC 8725 says to treat these header values as untrusted input on your server.
When one user can do something another can't, decode both tokens and copy the payloads. The difference is usually one claim, like a role, a scope or a tenant. The Text Diff Checker shows it at a glance.
Decoding or verifying? Know which one you need
They sound alike but answer different questions. Mixing them up is how forged tokens get accepted.
What does the token say?
Turns the base64url parts back into JSON. Anyone can do it, which is why it's safe to do in your browser.
Best for debugging, support and learning
Was it really issued by us?
Checks the signature with the right key and algorithm, then the claims. Only after this can you trust what it says.
Required before any access decision
Who uses this JWT decoder
Six everyday reasons to look inside a token.
Backend developers
Seeing why an API returns 401 or 403: expiry, audience or a missing scope.
Frontend and mobile devs
Checking what the login flow actually returned before wiring up the UI.
Security reviewers
Spotting sensitive data in payloads and weak or missing algorithm settings.
QA testers
Confirming a test account's role and tenant before filing a bug.
Students
Learning how header, payload and signature fit together with a real token.
Support engineers
Reading a customer's expired token to see which account and app it came from.
Frequently asked questions
Quick answers about decoding, privacy and what a JWT can and can't tell you.
What is a JWT token?
Is my token safe here?
Can I verify the signature?
What are JWT claims?
Why does my token show as expired?
What people say
Reviews from people who used this tool.
Loading reviews…
More free developer tools
Free, with no sign-up, just like this one.
- Free toolBase64 Encoder / DecoderEncode text to Base64 or decode Base64 strings instantly in your browserTry it now
- Free toolFavicon GeneratorTurn any image into the full favicon set - six standard sizes plus the HTML meta tags ready to paste, generated locally in your browser.Try it now
- Free toolHash GeneratorGenerate MD5, SHA-1, SHA-256, SHA-512 hashes from text or filesTry it now
- Free toolUnix Timestamp ConverterConvert Unix timestamps to human dates and vice versa with live clockTry it now
- Free toolRegex TesterTest regular expressions with live matching, highlighting, and group extractionTry it now
- Free toolCron Expression GeneratorBuild, preview, and copy cron expressions visually with presets and next run time previewTry it now