Header
Payload
Quick Answers: JWT Decoder
- A JWT has three parts separated by dots: header, payload and signature. The first two are Base64url JSON, so anyone can decode them. Only the signature needs a key.
- The time claims are unix timestamps in seconds. The exp claim is when the token expires, iat is when it was issued, and nbf is the earliest time it may be used.
- Decoding is not verifying. A decoded payload can be faked. Only a signature check proves a token is genuine.
- Nothing leaves your browser. Paste a production token here instead of a random online debugger, because a token sent to a server can be copied and reused.
What Is a JWT?
A JSON Web Token, or JWT, is a compact way to pass claims between two parties, usually a login server and an application. It packs those claims into three segments separated by dots: header, payload and signature. The header is a small JSON object naming the signing algorithm, most often HS256 or RS256, and the token type. The payload is a JSON object with the claims, such as who the user is, when the token was issued, and when it expires. The signature is a hash of the first two parts made with a secret key or a private key, and it is the only part that proves the token is genuine.
The first two parts are only encoded, not encrypted. Base64url is a way of writing bytes as text, not a way of hiding them, so anyone who has the token can decode the header and payload in seconds, with no key at all. That is by design: the payload is meant to be readable, and the security comes from the signature, not from secrecy. It is also why you should never put a password, a secret, or anything sensitive in a payload. This decoder reads those two parts and shows them as readable JSON, and it refuses to pretend the signature has been checked, because it has not.
What exp, iat and nbf Mean
| Claim | Meaning | Example (11 May 2024) |
|---|---|---|
| exp | Expiration time. After this second, the token must be rejected. | 1715433512, 13:18:32 UTC |
| iat | Issued at. The second the token was created. | 1715429912, 12:18:32 UTC |
| nbf | Not before. The earliest second the token may be accepted. | 1715429912, 12:18:32 UTC |
The JWT standard, RFC 7519, defines these three registered claims, and all three use the same unit: seconds since 1 January 1970, 00:00:00 UTC. That is the same epoch the unix timestamp converter on the home page uses, so the example values in the table above are the same instant the converter shows for 1715429912. A validator checks them with plain integer comparison: the token is valid when the current unix time is at or after nbf and before exp. Clock skew, the small difference between two machines' clocks, is why most validators allow a leeway of 30 to 60 seconds around those boundaries.
How to Decode a JWT Without a Library
You do not need a JWT library to inspect a token. The decoding is only a few lines, and knowing it helps when a token misbehaves in production and no library is at hand. The only subtle part is the character handling: Base64url uses minus and underscore where standard Base64 uses plus and slash, and names with non-English characters need the percent-decoding step below, or JSON.parse will fail on them.
function decodeJwtPayload(token) {
const base64 = token.split('.')[1]
.replace(/-/g, '+').replace(/_/g, '/');
const json = decodeURIComponent(
atob(base64).split('').map(function (c) {
return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
}).join('')
);
return JSON.parse(json);
}
const payload = decodeJwtPayload(token);
const expired = Math.floor(Date.now() / 1000) > payload.exp;import base64
import json
import time
def decode_jwt_payload(token):
payload_b64 = token.split('.')[1]
payload_b64 += '=' * (-len(payload_b64) % 4)
return json.loads(base64.urlsafe_b64decode(payload_b64))
payload = decode_jwt_payload(token)
expired = int(time.time()) > payload['exp']Signature verification is a separate step that requires the secret or public key, and this page never claims to do it. In production, prefer a battle-tested library such as jose or jsonwebtoken that verifies the signature, checks the algorithm, validates the audience and enforces clock skew. Use this decoder when you need a fast, private look at an expiry time while debugging logs or support tickets.
Common JWT Timestamp Bugs
- Seconds versus milliseconds. The standard requires seconds. Writing Date.now(), which returns milliseconds, into exp produces a 13 digit value that looks like a date tens of thousands of years in the future when read correctly. Writing it the wrong way round produces 1970.
- Time zone display confusion. Claims are always UTC seconds. Showing them in local time without labelling UTC misleads readers in other zones. This decoder shows UTC first for that reason.
- Clock skew. Distributed systems often allow a small leeway, usually 30 to 60 seconds, when comparing exp and nbf to now. A token that looks barely expired on one machine may still be accepted on another.
- Missing exp. Some tokens omit expiration. That is a security smell for session-like tokens: inspect deliberately rather than assuming the token is forever valid.
- Long-lived tokens. An access token that lives for a day gives an attacker a day of use if it leaks. Short lifetimes with refresh tokens are the usual fix.
When to Use This Tool vs Libraries
Use this JWT decoder to paste a token from DevTools, an email, or a log line and see human-readable exp, iat and nbf without installing anything. Privacy matters here: 100 percent in-browser processing means the JWT never leaves your tab, which is the right way to handle production tokens you should not paste into random online JWT debugger backends.
Use jose, jsonwebtoken or PyJWT inside applications to verify signatures, restrict algorithms, validate audiences, and reject tampered tokens. Decoding alone is never authentication. If your server only decodes and never verifies, anyone can forge a token with any claims they like, including an admin role and a far-future expiry.
JWT Decoder FAQs
What is a JWT decoder?
A JWT decoder reads the header and payload of a JSON Web Token and shows them as readable JSON. A token has three parts separated by dots: header, payload and signature. The first two are Base64url encoded JSON, so anyone can decode them without a key. The third part is the signature, which only the issuer can create. This tool decodes the first two parts in your browser and never touches the signature.
What do JWT exp, iat and nbf mean?
They are the three time claims in a token payload, all stored as unix timestamps in seconds. The exp claim is the expiry time: after it, the token must be rejected. The iat claim is the issued-at time: when the token was created. The nbf claim is the not-before time: before it, the token must not be accepted. All three count seconds since 1 January 1970, 00:00:00 UTC, the same epoch the unix timestamp converter on the home page uses.
Does this tool verify the JWT signature?
No, and it says so plainly. Decoding only reads what the payload says. Verifying means checking the signature against the secret key or public key, which this page never asks for and never could do in the browser without the key. A decoded token can be faked by anyone, so never treat a decoded payload as proof. Use the jose library or jsonwebtoken in your own code to verify signatures, and use this tool only to inspect a token while debugging.
Why does my JWT exp show a date in 1970 or far in the future?
The unit is wrong. The JWT standard says exp, iat and nbf are Unix seconds, but some issuers write milliseconds by mistake. A millisecond value read as seconds gives a date tens of thousands of years ahead, and a second value read as milliseconds gives a date in January 1970. Check the digit count: 10 digits means seconds, which is what the standard requires. If your token has 13 digits in exp, the issuer has the bug, not the decoder.
Is my JWT sent to a server when I paste it here?
No. The decoding runs in your browser with JavaScript, and the token never leaves the tab. That matters more for JWTs than for plain timestamps, because a token pasted into a random online debugger can be copied and reused by whoever runs that server. This site has no server side at all, so there is nowhere for the token to go.
When should I use this tool instead of jose or jsonwebtoken?
Use this tool when you are reading a token out of a log line, a support ticket or a DevTools network tab and want to know when it expires, without installing anything. Use jose or jsonwebtoken inside an application, where you must verify the signature, check the algorithm, validate the audience and reject tokens that fail. Decoding alone is never authentication, and no online tool can replace the checks your server has to do.
How do I decode a JWT payload in one line of JavaScript?
Split the token on dots, take the middle part, convert Base64url back to standard Base64, decode it and parse the JSON. The short version is JSON.parse(atob(token.split('.')[1].replace(/-/g, '+').replace(/_/g, '/'))), but that breaks on non-English characters in names, so the full snippet in the guide below handles those properly. Either way, the result is the payload object, and payload.exp is the expiry time in Unix seconds.
What happens when a JWT has no exp claim?
The token never expires by the clock, and this tool says so with a warning. A token without exp stays valid until the issuer revokes it, which means a leaked token works forever unless the issuer keeps a revocation list. That is a security smell for session tokens. Short-lived tokens should always carry exp, and refresh tokens should be stored separately and rotated.
Related tools
Source: RFC 7519, JSON Web Token. Reference values on this page were decoded and checked in JavaScript and Python on 27 November 2026.