Skip to content
HandyKit

JWT Decoder

Paste a JSON Web Token to see its header, payload and claims, check whether it has expired, and verify its signature. You can also create signed tokens. Everything happens in your browser.

Runs in your browser. Your input is never uploaded or stored.

This is an example token. Paste yours to replace it; it stays in this tab.

What is a JWT?

A JSON Web Token (JWT, often pronounced "jot") is a compact, signed piece of JSON used to pass identity and permissions between systems. It is defined by RFC 7519. When you sign in to an app, the server often gives you a JWT, and your browser sends it back with each request, usually in an Authorization: Bearer … header.

A JWT is three Base64URL-encoded parts joined by dots:

header.payload.signature
  • The header says how the token is signed, for example {"alg": "HS256", "typ": "JWT"}.
  • The payload holds the claims: statements about the user and the token, such as who it is for and when it expires.
  • The signature is computed from the header and payload with a secret or private key. It lets the receiver detect any change to the token.

How to decode a JWT

  1. Paste the token into the box. A Bearer prefix, quotes or line breaks are removed for you.
  2. The header, payload and claims appear as you type. Time claims are converted to readable dates.
  3. Check the status line: it says whether the token has expired, is not valid yet, or has no expiry.
  4. Select Copy header or Copy payload to use the decoded JSON elsewhere.
  5. To check the signature, enter the secret or paste the issuer’s public key under Verify the signature.

The page opens with an example token and its secret, so you can see a verified result straight away. Paste your own token to replace it.

Creating a token

The Create a token tab signs a header and payload with a secret (HS256, HS384, HS512) or a private key (RS, PS, ES and EdDSA, as PEM or JWK). Signing happens in your browser with Web Crypto. Use it for tests and local development, with test keys: a production private key should never be pasted into any website.

Decoding is not verifying

Decoding a JWT only reverses the Base64URL encoding, and anyone can do it. It tells you what the token claims, not whether those claims are true. Someone could create a token with "role": "admin" in seconds.

A server must verify the signature before trusting anything in a token. That means checking the signature with the issuer’s key, using an algorithm it expects (never none), and checking exp, nbf, iss and aud. Use a maintained library for this rather than writing your own. This page can verify a signature too, which helps when debugging, but it doesn't replace the check on your server.

Registered claims

These standard claims have the same meaning in every JWT:

  • iss (issuer): who created the token, such as https://auth.example.com.
  • sub (subject): who the token is about, usually a user ID.
  • aud (audience): which service the token is meant for.
  • exp (expiration time): after this moment the token must be rejected.
  • nbf (not before): before this moment the token must be rejected.
  • iat (issued at): when the token was created.
  • jti (JWT ID): a unique identifier that helps stop a token being reused.

Any other claim, such as name, email or roles, is defined by the application that issued the token.

Times in JWTs

exp, nbf and iat are Unix timestamps: whole seconds since 1 January 1970 UTC. For example, 1760000000 is 9 October 2025, 08:53:20 UTC. A common bug is writing milliseconds instead, which puts the expiry tens of thousands of years in the future. This decoder warns when a time looks like milliseconds.

Decoding a JWT in code

To read a payload in a current browser (without verifying it):

const [, payload] = token.split('.');
const claims = JSON.parse(
  new TextDecoder().decode(Uint8Array.fromBase64(payload, { alphabet: 'base64url' })),
);

In Node.js, Buffer.from(payload, 'base64url').toString('utf8') does the decoding. On the command line, standard base64 -d fails on JWTs because they use the URL-safe alphabet and omit padding.

For anything that makes a security decision, verify instead of decoding: use a library such as jose in JavaScript or PyJWT in Python, and pass it the key and the algorithms you accept.

Frequently asked questions

Is it safe to paste my JWT here?

The token is decoded by JavaScript in this tab and is never sent to a server, logged or stored, and the page’s security policy blocks it from contacting other servers. Even so, a live token is a password: anyone holding it can act as you until it expires. Prefer expired or test tokens when you can.

Does this tool verify the signature?

Yes. Under “Verify the signature”, enter the shared secret for HS256, HS384 or HS512 tokens, or paste the issuer’s public key as PEM or JWK (a JWK Set works too, matched by "kid") for RS, PS, ES and EdDSA tokens. The check uses your browser’s built-in Web Crypto, so the key never leaves the tab. Your server must still verify every token itself, with a maintained JWT library.

Why can anyone read the payload of my JWT?

Standard JWTs are signed, not encrypted. The signature stops the contents being changed without detection, but it does not hide them. Never put secrets such as passwords in a JWT payload. If the contents must be private, use an encrypted token (JWE).

What does "exp" mean, and why is my token expired?

exp is the expiry time, in seconds since 1 January 1970 UTC. After that moment servers must reject the token. Access tokens are often short-lived, five minutes to an hour, so an expired token is normal: your app is expected to get a new one.

What is alg "none"?

It marks an unsigned token. Because anyone can create one, servers must never accept alg "none" for authentication. Accepting it by mistake was a well-known vulnerability in early JWT libraries.

Can I edit a JWT?

You can change the payload, but the signature will no longer match, and any server that verifies tokens will reject it. Only someone holding the signing key can create a valid token. If you have the key, for example in testing, the “Create a token” tab signs a new token in your browser.

Guides

  • · 5 min read

    What Is a JWT? Structure, Claims and Security

    A JSON Web Token is three Base64URL parts: header, payload and signature. Learn what each holds, how to read the claims, and why decoding is not verifying.