All free toolsUtilities

Decode a JWT, check its expiry and verify its signature.

17free utilities

Local processing limits: 50 MB per file, 20 files and 100 MB per selection. Some tools have stricter limits. Large or complex files can still exceed device memory.

Your files stay private·Nothing is stored or retained
Free, no sign-up·No watermark

Token

Verify signature

The token and the secret are never stored or sent anywhere.

Header

Payload

Claims

exp (expires)
2035-09-21 15:06:40 UTC (in 4667713 min)
iat (issued)
2025-09-23 04:00:00 UTC (588953 min ago)
sub
1234567890
Algorithm
HS256
Type
JWT
Key ID
—
Token is not expired.
Enter the shared secret to verify the HMAC signature.

Processing and privacy: JWT Decoder

File processing runs in your browser. Your selected file is not uploaded by this tool. The website still receives ordinary page and asset requests. Keep your browser updated and review the output before sharing it.

File sizes and processing time depend on the tool and your device. Safety limits may apply; unlimited file sizes and instant completion are not guaranteed.

Complete Master GuidePublished by Cortexis Solution Hub Pvt Ltd Document Research Lab • 9 min read

JWT Decoder: How to Decode a JWT, Check Its Expiry and Verify Its Signature

An API returns 401 with “invalid token”, or a login works for an hour and then stops. Either way, you have a JWT and you need to see what is inside it. This guide shows how to decode JWT tokens with a free JWT decoder, read the header and payload as clean JSON, see when a token expires, and confirm its signature with the key you hold. It also covers why verification fails and what this JWT parser does not do.

A wax seal pressed over a sprig of dried grasses on cream paper
Three parts, two of them readable by anyone. The third is the one that tells you whether to trust the other two.

1. What Is a JWT? The Three Parts and the Claims

A JSON Web Token, defined in RFC 7519, is three base64url strings joined by dots: a header naming the signing algorithm, a payload carrying the claims, and a signature over the first two. The header and payload are only encoded, not encrypted, which is why any JWT decoder can turn them back into JSON. The claims you will meet most often are these:

  • exp — the time the token expires.
  • iat — the time it was issued.
  • nbf — “not before”, the time it starts being valid.
  • iss — the issuer, usually your identity provider’s URL.
  • sub — the subject, normally a user ID.
  • aud — the audience, a single value or a list of the APIs it is meant for.
  • kid — a header field naming which key signed it.

Anything else, such as roles or scopes, is a custom claim added by the issuer. That is why people decode an ID token from an OpenID Connect login, decode an Azure AD access token to check its roles, scopes and audience, or decode a Firebase auth token to see a user’s UID and custom claims. They all read the same way.

2. How to Decode a JWT Token in Three Steps

Here is how to decode a JWT token with the tool above. The result updates as you type.

  1. Paste the token. Replace the sample in the Token box with yours. To decode a bearer token, paste the whole Authorization header value: a leading Bearer is removed for you, and stray spaces or line breaks are ignored.
  2. Read the header and payload. Each appears as indented JSON you can copy or download as header.json and payload.json. This is how to read a JWT payload: user ID, roles and scopes are all there in plain text.
  3. Check the Claims list. It shows exp, iat and nbf as UTC dates with how long ago or how soon they fall, then iss, sub, aud, the algorithm and the key ID.

Need to explore a very large payload? Copy it into the JSON formatter. Found the token inside a redirect URL with percent escapes in it? Run it through the URL encoder and decoder first, because a percent-encoded token will not split cleanly.

3. Decoding Is Not Verifying

You can decode a JWT without the secret, and that is exactly the problem with trusting a decoded token. Anyone can edit the payload, change role to admin and re-encode it. Only the signature shows whether the issuer produced those exact bytes, and checking it needs the key.

A JWT debugger that only decodes tells you what a token claims; this one also checks it against the key you supply. That is the difference between a JWT token checker that looks at the expiry and a JWT validator that checks structure, expiry and signature together.

4. JWT Verify Signature Online: Secret or Public Key

The tool reads the header’s alg and offers the right check. For JWT verify signature online jobs there are two routes.

HS256, HS384, HS512

To verify an HS256 JWT with a secret, type the shared secret into the Secret (HMAC) field. The answer appears straight away: the signature is valid for this secret, or it does not match. If your secret is stored encoded, tick Secret is base64url-encoded first.

RS, PS and ES algorithms

For RS256, PS256, ES256 and their larger siblings, a box appears for a PEM public key starting with -----BEGIN PUBLIC KEY-----. Paste it and press Verify with public key to see Signature VALID or INVALID.

That second card is how to verify a JWT signature with a public key, and it covers the common cases: you can verify an RS256 JWT with a PEM public key, and the ES256 JWT verify online case works the same way for ECDSA tokens on the P-256, P-384 and P-521 curves.

What it does not do. It does not create or sign new tokens. It does not fetch keys from a JWKS URL, so you paste the public key yourself and pick the one matching the kid. It accepts a BEGIN PUBLIC KEY block only, not a certificate or a BEGIN RSA PUBLIC KEY block. Encrypted five-part tokens (JWE) and EdDSA signatures are not supported.

5. JWT Invalid Signature or Malformed? The Fixes

A JWT invalid signature error usually means the key is subtly wrong, not that the token was forged. Each message points to a fix:

  • “Signature does NOT match this secret.” Check for a trailing space or the wrong environment’s secret. The classic JWT base64 encoded secret trap is a secret that is stored encoded and decoded before signing: tick the base64url checkbox and try again.
  • “Signature INVALID.” The key is well formed but is not the one that signed this token. Providers rotate keys, so compare the Key ID in the Claims list with the kid of the key you pasted.
  • “Could not verify” followed by an error. The key could not be read. The usual cause is a certificate or an RSA-format block pasted instead of a BEGIN PUBLIC KEY block, or a key for a different algorithm family.
  • “Not a JWT: expected 3 dot-separated parts.” This is the JWT malformed case, usually a truncated copy with the dots missing. “Header is not valid base64url JSON” or its payload twin names the broken part; a stray quote mark or a percent-encoded character is the usual culprit there.
  • “alg=none — this token is unsigned.” The alg none JWT vulnerability is a token that declares no signature at all. A server that accepts one lets anyone write their own claims. RFC 8725, the JWT best-practice document, tells libraries to reject it.

Comparing two tokens? Paste both payloads into the diff checker to spot the changed claim.

6. How to Check If a JWT Is Expired

The exp claim is a Unix timestamp in seconds, which is useless to read by eye. This is how to check if a JWT is expired: paste it, and the Claims list does the JWT exp timestamp to date conversion for you, as a UTC date and time with “N min ago” or “in N min” beside it. A notice underneath says plainly whether the token is expired.

That answers the JWT expired error question directly: you see the exact moment it lapsed, which usually shows whether the fault is a short lifetime or a missing refresh. For the opposite complaint, JWT not valid yet (nbf), the page shows when the token starts being valid and warns when that is still in the future, which usually means two clocks disagree.

Two honest limits. Times are shown in UTC and rounded to the minute; for local time zones or other timestamps, use the timestamp converter. And only exp and nbf are checked: iss and aud are shown but not compared with expected values, and there is no clock-skew allowance.

7. Why Cortexis Is the Best Free JWT Decoder

There are plenty of places to find a JWT decoder online free. Here is what is different about this one.

Genuinely free, no account

No sign-up, no email and no usage counter. Paste a token and the result is there.

Verifies, not just decodes

HMAC secrets for HS256, HS384 and HS512, plus PEM public keys for RS, PS and ES algorithms, all on one page.

Tokens stay private

Tokens, secrets and keys are never stored on our servers, and nothing you paste is retained.

Nothing is used for training

What you paste is never used to train anything. A production token stays yours.

Readable times, not raw numbers

exp, iat and nbf appear as UTC dates with how long ago or how soon, plus a clear expired or not-yet-valid notice.

Errors you can act on

Wrong secret, wrong key, unreadable key, malformed token and unsigned alg=none each get their own message.

It sits among our free developer and file tools, built on the same terms. Need a random jti for a test token? The UUID generator makes one, and the hash generator computes a standalone HMAC or SHA hash of any text.

8. Frequently Asked Questions (FAQ)

How do I decode a JWT for free?

Paste the token into the box at the top of this page. The header and payload appear as formatted JSON straight away, with the expiry and other claims listed underneath. There is no account or sign-up.

Is it safe to paste a JWT into an online JWT decoder site?

It depends on what the page does with it. On this page, tokens, secrets and keys are never stored on our servers, nothing is retained, and nothing is used for training. When you only need the structure, an expired or test token is the safer habit.

How do I decode an Azure AD access token or a Firebase auth token?

Paste it into the Token box; a leading Bearer is removed for you. The payload shows the tenant or project as iss, the app as aud, and roles, scopes or custom claims as plain JSON. Both are usually RS256-signed, and their providers often publish keys as JWKS entries or certificates, which this tool does not accept, so convert the matching key to a BEGIN PUBLIC KEY block before verifying.

Can I decode a JWT without the secret?

Yes. The header and payload are only base64url-encoded, so anyone can read them without a key. Without the secret or public key you cannot prove the token is genuine, so decoding alone is never validation.

Why does my JWT signature show as invalid?

Usually the key is wrong. Check for a trailing space in the secret, tick the base64url box if the secret is stored encoded, and make sure the public key matches the kid in the header. A certificate pasted instead of a BEGIN PUBLIC KEY block cannot be read at all.

Can I verify a token using my provider's JWKS URL?

Not directly. The tool does not fetch keys, and a JWKS lists keys in JSON (JWK) form rather than PEM. Open the JWKS document yourself, find the key whose kid matches the token, convert that key to a PEM public key with your usual crypto tooling, and paste the result. Certificates and BEGIN RSA PUBLIC KEY blocks are not accepted, only BEGIN PUBLIC KEY.

Can this tool create or sign a new JWT?

No. It decodes and verifies existing tokens only; it has no generator and does not sign with a private key. Issue test tokens with your auth library, then paste them here.

Does it decrypt encrypted JWE tokens or verify EdDSA?

No. Encrypted tokens with five parts and EdDSA or Ed25519 signatures are not supported. It handles signed tokens using HS, RS, PS and ES algorithms.

My string is base64 but not a JWT. What should I use?

Use the Base64 encoder and decoder, which handles plain base64 and base64url text of any kind. This page only reads dot-separated JWT parts.

Working through an auth bug? Decode stray base64 values with the Base64 encoder and decoder, turn a Unix time from your logs into a readable date with the timestamp converter, or test the pattern that pulls tokens out of those logs with the regex tester. And if you would rather build token-based login than only debug it, our free full-stack web development course covers the authentication groundwork behind JWTs.