JWT Debugger — Decode, Verify HS256, Read exp/iat/nbf
Paste a JSON Web Token to decode the header and payload locally. Verify HS256 signatures with a secret you type here — Web Crypto runs in your browser, the secret never leaves the device. exp, iat, and nbf show as Unix, UTC, and local time, with expired and not-yet-valid badges after the page mounts.
What is a JWT?
A JWT (JSON Web Token) is a compact token format consisting of three Base64url-encoded parts separated by dots: header, payload, and signature. The header declares the signing algorithm, the payload contains claims, and the signature verifies integrity. HS256 is HMAC-SHA256 with a shared secret. See: RFC 7519.
Why Use This Tool
- Debug authentication issues — Inspect exp and iat, and see an expired badge when the token is past exp.
- Verify HS256 signatures — Paste the HMAC secret to check whether the signature matches. Invalid tokens are marked clearly.
- Check not-before — nbf in the future shows a not-yet-valid badge so you can tell clock-skew issues from bad tokens.
- Inspect permissions — See roles, scopes, or custom claims embedded in the token.
- API development — Test tokens generated by your auth system. Format JSON claims →
- Convert timestamps — Read exp, iat, and nbf as UTC and local dates. Convert timestamps →
Tips
- JWTs have three parts: header.payload.signature.
- Anyone can read the header and payload; they are only Base64url, not encrypted.
- HS256 verification needs the same secret the issuer used.
- Expired means exp is at or before now; not yet valid means nbf is still in the future.
- Use the Timestamp converter if you need to turn a raw Unix value into another timezone.
How to Use the JWT Debugger
Paste your JWT
Copy a JWT (three Base64url strings separated by dots) into the token field, or load a sample.
View header and payload
The header shows alg and typ. The payload shows claims as JSON.
Read time claims
exp, iat, and nbf appear as Unix, UTC, and local time. Expired and not-yet-valid badges appear after mount.
Verify HS256
Enter the HMAC secret. Valid and invalid signatures are labeled. Other algorithms are not verified.
Worked Examples
Typical JWT header
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
{
"alg": "HS256",
"typ": "JWT"
}Payload with time claims
iat 1700000000, exp 1700003600
iat: 2023-11-14 22:13:20 UTC exp: expired
HS256 verification
Token + matching HMAC secret
Signature valid
Common Errors & How to Fix Them
| Error Message | Cause | Fix |
|---|---|---|
Invalid token format | Token does not have three parts separated by dots | A valid JWT has exactly two dots: header.payload.signature. |
Signature invalid | The HMAC does not match the secret, or the token was altered | Confirm the HS256 secret. A different secret or a mutated payload will fail. |
Not HS256 | The header alg is RS256, ES256, or another algorithm | This tool verifies HMAC-SHA256 only. You can still decode the claims. |
Cannot parse JSON | Decoded header or payload is not valid JSON | The token may be truncated. Copy it again from the source. |
Common JWT Claims
| Feature | Claim | Meaning |
|---|---|---|
| iss | Issuer | Who created and signed the token |
| sub | Subject | Who the token represents (user ID) |
| aud | Audience | Intended recipient of the token |
| exp | Expiration | Not valid at or after this Unix time |
| iat | Issued At | Unix timestamp when the token was created |
| nbf | Not Before | Not valid before this Unix time |
Frequently Asked Questions
How do I decode a JWT token locally?
Paste the JWT into this tool. The header and payload are Base64url-decoded in your browser. Nothing is uploaded.
Does this JWT debugger verify signatures?
Yes, for HS256. Enter the HMAC secret and the tool uses Web Crypto to HMAC-SHA256 the header and payload. Valid and invalid results are shown clearly. RS256 and other algorithms are decoded but not verified.
How are exp, iat, and nbf displayed?
Each time claim is shown as a Unix timestamp, a UTC date, and (after the page mounts) local time. If exp is in the past you get an expired badge. If nbf is in the future you get not yet valid.
Is the HMAC secret sent to a server?
No. Verification uses crypto.subtle in the browser. The secret never leaves the page.
How do I decode a JWT in JavaScript?
Split by dot, then decode the payload: JSON.parse(atob(token.split(".")[1])). To verify HS256, HMAC-SHA256 the first two parts with the secret and compare to the third part.
Does this JWT decoder upload my token?
No. Decode and HS256 verify run in JavaScript on your device.