Encoding & Security

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.

JWT Token
HS256 secret
Token header will appear here
Payload claims will appear here
Signature will appear here

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

1

Paste your JWT

Copy a JWT (three Base64url strings separated by dots) into the token field, or load a sample.

2

View header and payload

The header shows alg and typ. The payload shows claims as JSON.

3

Read time claims

exp, iat, and nbf appear as Unix, UTC, and local time. Expired and not-yet-valid badges appear after mount.

4

Verify HS256

Enter the HMAC secret. Valid and invalid signatures are labeled. Other algorithms are not verified.

Worked Examples

Typical JWT header

Input
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
→
Output
{
  "alg": "HS256",
  "typ": "JWT"
}

Payload with time claims

Input
iat 1700000000, exp 1700003600
→
Output
iat: 2023-11-14 22:13:20 UTC
exp: expired

HS256 verification

Input
Token + matching HMAC secret
→
Output
Signature valid

Common Errors & How to Fix Them

Error MessageCauseFix
Invalid token formatToken does not have three parts separated by dotsA valid JWT has exactly two dots: header.payload.signature.
Signature invalidThe HMAC does not match the secret, or the token was alteredConfirm the HS256 secret. A different secret or a mutated payload will fail.
Not HS256The header alg is RS256, ES256, or another algorithmThis tool verifies HMAC-SHA256 only. You can still decode the claims.
Cannot parse JSONDecoded header or payload is not valid JSONThe token may be truncated. Copy it again from the source.

Common JWT Claims

FeatureClaimMeaning
issIssuerWho created and signed the token
subSubjectWho the token represents (user ID)
audAudienceIntended recipient of the token
expExpirationNot valid at or after this Unix time
iatIssued AtUnix timestamp when the token was created
nbfNot BeforeNot 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.