JWT Debugger — Decode a JSON Web Token and Verify Its Signature

Paste a JSON Web Token to decode its header and payload, see time claims as real dates, check whether it has expired, and verify the signature with a secret or public key.

Live demo · real result from this tool
HS256/384/512: the shared secret. RS/PS/ES: a PEM public key (BEGIN PUBLIC KEY) or a public JWK.

Signature verified (HS256).

Header

{  "alg": "HS256",  "typ": "JWT"}

Payload

{  "sub": "1234567890",  "name": "John Doe",  "iat": 1516239022}

Claims

ClaimMeaningValue
subSubject1234567890
nameNameJohn Doe
iatIssued at1516239022 = 2018-01-18T01:30:22Z (9 years ago)

Header and payload are only Base64URL-encoded, not encrypted — anyone with the token can read them. Verification happens in your browser; the token and key are not sent anywhere.

Processed on your device — nothing is uploaded.

How to use the JWT debugger

  1. Paste the token into JWT. It has three parts separated by dots.
  2. To verify the signature, enter the Secret or public key. For HS algorithms that is the shared secret. For RS, PS or ES it is a PEM public key or a public JWK.
  3. If your HS secret is stored as Base64 or hex, choose it under Secret encoding.
  4. Read the verification message at the top, then the decoded Header, Payload and Claims table.
  5. Check the notice that says whether the token has expired or is not valid yet.

What it does and when to use it

JSON Web Tokens carry identity and permissions between services. When login breaks or an API returns 401, the first step is to look inside the token. This debugger shows you exactly what it says and whether its signature holds up.

Use it to:

  • Read the claims in a token from your identity provider or API.
  • Check expiry, issued-at and not-before times as real dates.
  • Confirm that a token was signed with the secret or key you expect.
  • Spot a token that was created with milliseconds instead of seconds.
  • Teach or learn how JWTs are built.

To create a test token with your own claims, use the JWT Generator. To convert any single timestamp, try the Unix Timestamp converter. The header and payload are Base64URL, which the Base64 Decoder can also read.

How it works

A JWT is three Base64URL strings joined by dots: header, payload and signature. The tool decodes the first two into JSON and lists every claim, with a short meaning for standard ones such as iss, sub, aud, exp, nbf, iat and jti. Time claims are converted from seconds to ISO dates, with how long ago or how far ahead they are.

To verify, it rebuilds the signing input (header and payload) and checks the signature with your secret or public key using the browser’s Web Crypto API (crypto.subtle). HMAC tokens use the secret. RSA, RSA-PSS and ECDSA tokens use the public key. Nothing leaves your device.

Worked examples

The well-known sample token. The jwt.io sample token (header {"alg":"HS256","typ":"JWT"}, payload with "sub":"1234567890", "name":"John Doe" and "iat":1516239022) checked with the secret your-256-bit-secret gives Signature verified (HS256). The issued-at claim is shown as 1516239022 = 2018-01-18T01:30:22Z.

The wrong secret. The same token checked with the secret wrong gives Invalid signature, explaining that it was not signed with that secret or was modified.

A broken token. abc.def gives A JWT has three parts separated by dots; this has 2.

Limits and tips

  • Expiry is checked against your device’s clock. If your clock is wrong, the expiry notice will be too.
  • Encrypted tokens (JWE, with five parts) cannot be decoded here.
  • Verifying in a browser is for debugging. Your server must still verify every token itself, and should only accept the algorithms it expects.

Frequently asked questions

Is the JWT payload encrypted?
No. A standard signed JWT (a JWS) is only Base64URL-encoded, so anyone who has the token can read the header and payload, as this tool shows. The signature proves the token has not been changed, but it does not hide anything. Never put passwords or other secrets in a payload.
Which algorithms can it verify?
HS256, HS384 and HS512 with a shared secret, and RS, PS and ES algorithms (such as RS256, PS256 and ES256) with a PEM public key or a public JWK. A token that uses alg "none" has no signature and is flagged.
Is it safe to paste a token and key here?
Decoding and verification run in your browser with the Web Crypto API, and nothing is sent to a server. Even so, treat live production tokens and secrets with care, and prefer test tokens when you can. The tool refuses private keys pasted by mistake.
Why is my token rejected when the signature is valid?
Check the claims. The token may have expired (exp), may not be valid yet (nbf), or may have the wrong issuer (iss) or audience (aud) for your server. Clock differences between machines can also tip a token over its expiry time.
Why does my exp date show the year 50,000-something?
JWT times must be in seconds. If a token was created with milliseconds, for example from JavaScript's Date.now(), the date ends up far in the future. The tool adds a hint when a time claim looks like milliseconds.

Written by the ToolsRift team · Last updated

Pages are drafted with AI assistance and checked by automated tests. How we write and check pages.

Was this tool useful?

Report a problem

Start typing to search every tool.

↑ ↓ to moveEnter to openEsc to close