How to decode a JWT
- Paste the token into the box. A leading
Bearerfrom an Authorization header is removed for you, and line breaks are ignored. - Read the Header (algorithm and type) and the Payload (the claims) as formatted JSON. Times such as
expare shown as UTC dates, with how long ago or how long from now they are. - Copy any part with its own button.
The signature is shown but not verified. Verifying needs the secret (HS256) or the public key (RS256, ES256), and this page never asks for either. Treat decoded claims as unverified information: a decoder proves nothing about who issued the token.
What is inside a JWT
A JSON Web Token (RFC 7519) is three Base64URL strings joined by dots: header.payload.signature. Decoding the first two gives JSON. The widely used example token from the specification world decodes like this:
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
Header:
{
"alg": "HS256",
"typ": "JWT"
}Payload:
{
"sub": "1234567890",
"name": "John Doe",
"iat": 1516239022
}
Base64URL is plain Base64 with - and _ and no padding, so the first two parts are readable by anyone. A JWT is signed, not encrypted: never put a password, a card number or another secret in the payload.
Standard claims you will meet
| Claim | Meaning | Format |
|---|---|---|
iss | Issuer: who created the token | string or URL |
sub | Subject: who the token is about, often a user id | string |
aud | Audience: who should accept it | string or list |
exp | Expiration time: reject the token after this | Unix seconds |
nbf | Not before: reject the token until this | Unix seconds |
iat | Issued at | Unix seconds |
jti | Unique token id, used to block replays | string |
The three time claims are numbers of seconds since 1 January 1970 UTC. The decoder converts them: the example above was issued at 1516239022, which is Jan 18, 2018, 1:30:22 AM UTC. To convert any other number use the epoch converter.
Common reasons a token is rejected
- Expired:
expis in the past. The stats show Expired or Valid, judged against your computer's clock. A clock that is a few minutes off causes false failures, which is why servers often allow a small leeway. - Not yet valid:
nbfis in the future. - Wrong audience or issuer: the token was made for another service.
- Algorithm mismatch: the server expects RS256 and the header says HS256. A token with
"alg": "none"carries no signature at all and must never be accepted by a server that expects signed tokens. - Not a JWT at all: an opaque access token (a random string) has no dots and cannot be decoded. The decoder tells you it needs three parts.
An unsigned token, for example alg: none, decodes to: {
"alg": "none"
}
Is it safe to paste a token here?
The decoding runs in your browser and nothing is sent to a server or stored. Even so, a live token is a credential: anyone who has it can use it until it expires. Prefer tokens from a test environment, and revoke or let expire any production token you pasted into a shared screen or a chat. To check the JSON inside, use the JSON formatter; to decode a single Base64URL part by hand use Base64 decode with the URL-safe text pasted as is.
Related tools
- Base64 encode and decode – decode the Base64URL parts by hand
- JSON formatter – format and check the decoded payload
- Epoch and Unix timestamp converter – turn exp and iat numbers into dates
- Hash generator
JWT decoder FAQ
How do I decode a JWT?
Paste the token into the box. The header and payload appear as formatted JSON, with expiry and issue times as dates. Everything is decoded in your browser.
Does this verify the signature?
No. Verifying needs the secret or the public key. The signature is shown but not checked, so treat the decoded claims as unverified.
Is it safe to paste my JWT?
The token is decoded in your browser and never sent anywhere. A live token is still a credential, so prefer test tokens and do not share production tokens.
What does exp mean in a JWT?
exp is the expiration time as seconds since 1 January 1970 UTC. After it, a server should reject the token. The decoder shows it as a date and says if the token has expired.
Why does it say my token has only two parts?
A JWT needs three parts separated by dots. An opaque token or a truncated paste has fewer, and cannot be decoded.
Is the payload of a JWT encrypted?
Not in a normal signed JWT. The payload is only Base64URL encoded, so anyone with the token can read it. Do not put secrets in it.
What is alg none?
It means the token has no signature. A server that accepts such tokens can be tricked into trusting forged claims, so it should reject them.