# JWT Decoder

> The JWT Decoder splits a JSON Web Token into its header, payload and signature, decodes the base64url JSON, and shows standard claims such as exp, iat and nbf as readable dates with an expired or valid status. It does not verify the signature.

URL: https://atechcraft.com/jwt-decoder/
Category: Developer Tools
Last updated: 2026-12-01
Author: Abdul Moid Khan, ATechCraft

Runs in your browser. Your data never leaves your device.

## How to use the JWT Decoder

1. Paste a token (three parts separated by dots).
2. Read the decoded header and payload.
3. Check the expiry status and the readable dates for exp, iat and nbf.
4. Copy the payload JSON if needed.

## What is a JWT decoder?

A JWT decoder reads a JSON Web Token and shows what is inside it. This tool splits the token into its three parts, decodes the header and payload into readable JSON, turns time claims like `exp` (expiry) and `iat` (issued at) into normal dates, and tells you whether the token has expired. Decoding happens entirely in your browser.

It **does not verify** the signature. Decoding only reads the data; it doesn't prove the token is genuine.

## How is a JWT structured?

A JWT, defined in [RFC 7519](https://www.rfc-editor.org/rfc/rfc7519), is three base64url-encoded parts joined by dots:

```text
header.payload.signature
```

| Part | Contains | Example (decoded) |
| --- | --- | --- |
| Header | The signing algorithm and token type | `{"alg":"HS256","typ":"JWT"}` |
| Payload | Claims: facts about the user and the token | `{"sub":"42","name":"Ayesha","exp":1767225600}` |
| Signature | A cryptographic signature of the first two parts | Binary data, shown as base64url |

The header and payload are only **encoded**, not encrypted. Anyone who has the token can read them, which is exactly what this tool does. Base64url is a URL-safe version of Base64; you can explore it with the [Base64 tool](https://atechcraft.com/base64-encoder-decoder/).

## What do the standard claims mean?

| Claim | Name | Meaning |
| --- | --- | --- |
| `iss` | Issuer | Who created the token |
| `sub` | Subject | Who the token is about, often a user ID |
| `aud` | Audience | Which service should accept it |
| `exp` | Expiration time | After this moment the token must be rejected |
| `nbf` | Not before | The token is not valid before this moment |
| `iat` | Issued at | When the token was created |
| `jti` | JWT ID | A unique ID, useful to block reuse |

Times are **NumericDate** values: seconds since 1 January 1970 UTC. The decoder shows them in your local time; convert them to other time zones with the [Unix Timestamp Converter](https://atechcraft.com/timestamp-converter/).

## Worked example

Paste this sample token (made up, safe to use):

```text
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI0MiIsIm5hbWUiOiJBeWVzaGEiLCJleHAiOjE3NjcyMjU2MDB9.c2lnbmF0dXJl
```

The tool shows:

- **Header:** `{"alg": "HS256", "typ": "JWT"}`
- **Payload:** `{"sub": "42", "name": "Ayesha", "exp": 1767225600}`
- **Expires:** 1 January 2026, 00:00 UTC (shown in your local time zone), so the status is **Expired**.
- **Signature:** `c2lnbmF0dXJl` (not verified)

## Is it safe to paste a token here?

The token never leaves your browser: there is no server code behind this page. But be careful with any website, because a valid, unexpired token is like a temporary password. Good practice:

1. Use test or expired tokens when you can.
2. If you pasted a live production token somewhere you don't control, revoke it or let it expire.
3. Never put secrets such as passwords or card numbers in a JWT payload; anyone holding the token can read them.

## Tips for debugging tokens

1. **"Invalid signature" from your API?** Check `alg` in the header matches what your server expects, and that you're using the right secret or public key.
2. **401 errors right after login?** Compare `exp`, `nbf` and `iat` with the server's clock. A few seconds of clock difference can make a fresh token look "not yet valid".
3. **Wrong user data?** Read the payload here, then format it with the [JSON Formatter](https://atechcraft.com/json-formatter/).
4. **Need a checksum of a token or file?** Use the [Hash Generator](https://atechcraft.com/hash-generator/).

## Limitations

- No signature verification, because that needs your secret key or public key, which should never be pasted into a website.
- Encrypted tokens (JWE, five parts) can't be decoded without the key; the tool reports the wrong number of parts.
- A "Bearer " prefix is removed automatically, but other wrapping text must be removed by hand.
- Claims are shown as they are; the tool doesn't check `aud` or `iss` against your system.

## Frequently asked questions

### Does this verify the signature?

No. Verifying needs the secret or public key. Decoding only reads the contents, which anyone with the token can do.

### Is it safe to paste a token?

Decoding happens only in your browser. Even so, avoid pasting live production tokens into any website, and revoke any token you suspect is exposed.

### Are JWT payloads encrypted?

Standard signed JWTs (JWS) are only encoded, not encrypted. Do not store secrets in the payload.

### What is the exp claim?

The expiry time as a Unix timestamp in seconds (RFC 7519). After this time the token should be rejected.
