Skip to main content

JWT (JSON Web Token) Debugger

Decode JWT header and payload, then verify HS256/HS384/HS512 signatures locally in your browser.

This tool validates JWT structure and HMAC signature integrity only. It does not check token revocation or trust of issuer.

How to use

Paste a JWT token, click Decode to inspect header and payload, then enter your shared secret and click Verify to validate HS256/HS384/HS512 signatures. Verification runs entirely in your browser.

What is a JWT?

A JSON Web Token (JWT, RFC 7519) is a compact, signed way to pass claims between two parties, most often "this request comes from user 42 and is valid until 15:00". APIs and single sign-on systems use them as access tokens. A JWT has three parts separated by dots:

header.payload.signature
  • Header: the token type and the signing algorithm, e.g. {"alg":"HS256","typ":"JWT"}
  • Payload: the claims, e.g. sub (subject), exp (expiry), iat (issued at), plus your own
  • Signature: proves the header and payload were not changed since the token was signed

The header and payload are only Base64URL-encoded, not encrypted. Anyone holding the token can read them, so never put secrets in a JWT payload.

How it works

Decode splits the token at the dots, turns the Base64URL parts back into JSON and shows the header and payload, pretty-printed.

Verify recomputes the signature with the secret you enter and compares it with the one in the token. This tool supports the HMAC algorithms HS256, HS384 and HS512, using the browser's built-in Web Crypto API. The token and the secret stay in your browser; nothing is sent to a server.

Example

eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c

decodes to the header {"alg":"HS256","typ":"JWT"} and the payload {"sub":"1234567890","name":"John Doe","iat":1516239022}. With the secret your-256-bit-secret the signature verifies.

Limitations

  • Only HMAC signatures (HS256, HS384, HS512) can be verified. Tokens signed with RSA or ECDSA (RS256, ES256, PS256…) can be decoded but not verified here, because that needs a public key.
  • Encrypted tokens (JWE, five parts instead of three) cannot be decoded.
  • A valid signature does not mean the token is still good: check exp, nbf, iss and aud as your application would.

Frequently asked questions

Can anyone read the contents of a JWT?

Yes. The header and payload are only Base64URL-encoded, so anyone with the token can decode them. The signature stops people from changing the claims, not from reading them. Keep secrets out of the payload.

Is it safe to paste my JWT and secret here?

Decoding and verification happen entirely in your browser with the Web Crypto API; nothing is uploaded or logged. Even so, prefer test tokens, and rotate a production secret if it was ever pasted somewhere you do not control.

Why does verification fail?

The most common causes are a wrong or mistyped secret, extra spaces or line breaks around the token, a secret that your server treats as Base64 while you entered it as text (or the other way round), or a token signed with an algorithm other than HS256/HS384/HS512.

Which algorithms are supported?

Verification supports HS256, HS384 and HS512 (HMAC with SHA-256, SHA-384 and SHA-512). Any token can be decoded regardless of its algorithm.

How do I read the exp and iat claims?

They are Unix timestamps: seconds since 1 January 1970 UTC. exp is when the token expires, iat when it was issued and nbf the time before which it is not valid. 1516239022 is 18 January 2018, 01:30:22 UTC.

What is the difference between a JWT and a session cookie?

A session cookie holds a random ID that the server looks up in its own storage. A JWT carries the claims itself and the server only checks the signature, which suits APIs and services that do not share a session store, but makes revoking a single token harder.