JWT Decoder

Decode and inspect JWT headers and payloads locally without verifying or uploading the token.

  • Free
  • No signup
  • Runs in your browser

Decoding a JWT does not verify its signature or authenticity.

How it works

How to use

Paste a compact JWT and select Decode JWT.

Method

Header and payload Base64URL data are decoded without verifying the signature.

Example

Inspect claims such as sub, exp, nbf, and iat.

Start with the three dot-separated sections

A compact signed JWT is carried as three nonempty sections separated by dots. The first section contains the header, the second contains the payload, and the third carries the signature data. SnakTool requires exactly this three-part shape before it tries to decode the token.

The dots are structural separators, not decoration. A token with only two sections is incomplete for this decoder, while a five-part compact token belongs to a different JOSE structure such as JWE and is outside this page's supported input.

Compact JWT anatomy
xxxxx.yyyyy.zzzzz
  │     │     │
header payload signature

Base64URL makes the header and payload readable without a key

The first two JWT sections use Base64URL, a URL-safe Base64 alphabet that uses - and _ where standard Base64 uses + and /. SnakTool decodes those sections as UTF-8 and then parses the resulting text as JSON.

This is decoding, not decryption. A signed JWT payload is not hidden merely because it appears as an encoded string, so secrets should not be placed in a readable payload on the assumption that only the application can inspect it.

The header describes how the token says it was handled

A JWT header can contain fields such as alg, typ or kid. For example, alg may name a signing algorithm and kid may identify a key. Decoding lets you inspect those values, which is useful when diagnosing why a token and a verifier disagree.

The header is still data supplied by the token. Reading alg: RS256 does not prove that an RS256 signature was successfully verified, and reading a key identifier does not establish that the key is trusted. Verification software must apply its own allowed algorithms and trusted-key policy.

Example decoded header
{
  "alg": "RS256",
  "typ": "JWT",
  "kid": "key-2026"
}

Payload claims are statements until verification gives them context

The payload can carry registered claims such as iss for issuer, sub for subject and aud for audience alongside application-specific claims such as a role. A decoder can show exactly what those fields say, but it cannot establish that the statements are authentic.

If a decoded payload says role: admin, that text alone must not grant administrator access. An attacker can construct or modify encoded JSON. The application accepting the token must verify the signature and apply the issuer, audience and authorization rules it requires.

Example claims to inspect
{
  "iss": "https://auth.example",
  "sub": "user_123",
  "aud": "api.example",
  "role": "admin"
}

Numeric time claims are seconds, not JavaScript milliseconds

JWT NumericDate values are expressed as seconds from the Unix epoch. SnakTool looks for numeric exp, nbf and iat claims, multiplies those values by 1000 for JavaScript Date conversion, and shows an ISO date when the resulting date can be represented.

The three claims answer different questions: iat records when the token says it was issued, nbf specifies a time before which it should not be accepted, and exp specifies its expiration time. A common integration mistake is supplying a JavaScript millisecond timestamp where JWT expects seconds.

ClaimMeaningWhat SnakTool does
iatIssued AtShows a readable ISO date for a finite numeric value
nbfNot BeforeShows a readable ISO date for a finite numeric value
expExpiration TimeShows a readable ISO date for a finite numeric value

An expired token can still be perfectly decodable

Decoding answers whether the token's header and payload can be interpreted; acceptance is a separate decision. A token whose exp value represents a time in the past can still have valid Base64URL, valid UTF-8 and valid JSON, so there is nothing about expiration that prevents its contents from being displayed.

SnakTool converts supported time claims for inspection but does not turn those dates into a security verdict. A verifier needs its own current-time checks, clock-skew policy and claim requirements before deciding whether a token is acceptable.

The signature is present, but this decoder does not verify it

The third JWT section matters because signed-token verification binds the protected header and payload to signature data under the required algorithm and key. SnakTool requires a nonempty third section as part of the three-section token shape, but it does not ask for a secret, public key or JWKS and does not verify that signature.

This creates the most important boundary on the page: successful decoding means you inspected structured data, not that you authenticated it. Use a JWT verification library with trusted key material and an explicit validation policy wherever a security decision depends on the token.

Parsing success establishes structure, not trust

SnakTool is intentionally strict about the parts it does parse. The header and payload must contain valid Base64URL data, decode to valid UTF-8, parse as JSON, and produce JSON objects rather than arrays or primitive values.

Those checks can explain malformed-token errors, but none of them proves who created the token. A fabricated token can be well formed. Structural validity and cryptographic authenticity answer different questions.

The decoder can establishThe decoder cannot establish
There are exactly three nonempty sectionsThe issuer is trusted
Header and payload are valid UTF-8 JSON objectsThe signature is valid
Header and payload claims can be displayedThe claims are authentic
Numeric exp, nbf and iat can be shown as datesThe token should be accepted
The alg field can be readThat algorithm and key were correctly verified

Five compact sections point to a different job

A three-part signed JWT and a five-part compact JWE are not interchangeable formats. JWE is designed for encrypted content and uses five compact sections, so its contents cannot be handled by simply treating it as the three-part input expected here.

SnakTool's JWT Decoder rejects a five-section token because it requires exactly header, payload and signature sections. If the token is a JWE, it needs the corresponding decryption process and key material rather than this decoder.

Compact shapes
Signed JWT / JWS:  part.part.part
Compact JWE:       part.part.part.part.part

Treat a live token as a credential even when you only want to inspect it

JWTs copied from production systems can carry identity, authorization and session-related information. The fact that the payload is readable does not make the complete token harmless to expose.

Prefer synthetic or deliberately non-sensitive tokens for debugging examples. When a real credential must be investigated, handle it according to the security rules of the system that issued it and avoid sharing it more widely than necessary.

Frequently asked questions about JWT Decoder

Do I need the signing secret to read a JWT?

Not to decode the header and payload of the supported three-part signed format. Their Base64URL content can be read without the signing key. A trusted secret or public key is relevant to signature verification, which this decoder does not perform.

Why does an expired JWT still decode?

Expiration is a claim used during validation, not a requirement for Base64URL or JSON decoding. SnakTool can therefore display a numeric exp value and its ISO date even when that time is already in the past.

What does a JWT decoder do?

It reads the encoded header and payload of a supported three-part JWT and presents their JSON content. Decoding is inspection; it does not by itself authenticate the token.

Can I decode a JWT without the secret key?

Yes, the header and payload of a signed JWT are Base64URL encoded and can normally be decoded without the signing key. The key is needed for cryptographic verification, which this page does not perform.

Can I trust a JWT payload after decoding it?

Not merely because it decoded successfully. Treat decoded claims as untrusted statements until the application has verified the signature and applied the issuer, audience, time and other validation rules it requires.

Can anyone read a signed JWT payload?

Anyone who obtains a conventional signed JWT can generally Base64URL-decode its header and payload without the signing key. Do not place secrets there on the assumption that encoding provides confidentiality.

What does typ mean in a JWT header?

typ is a type header parameter often used to indicate the media type or application-level type, with JWT being a common value. Its presence is not itself a signature-verification result.

What do iss, sub and aud mean in a JWT payload?

iss identifies the claimed issuer, sub identifies the claimed subject, and aud identifies the intended audience. Decoding shows these claims; validation determines whether they are acceptable and trustworthy.

What does nbf mean in a JWT?

nbf is the Not Before claim, describing a time before which the token should not be accepted. SnakTool displays a finite numeric value as a date but does not make the acceptance decision.

Can a JWT without exp be decoded?

Yes. exp is not required by this decoder. A token can contain a valid header and payload without an expiration claim, although the application accepting the token may impose its own requirement.

Why does my token have five parts?

A five-part compact token is commonly a JWE rather than the three-part signed structure this decoder supports. JWE involves encryption and requires the appropriate decryption process and key material.

What is Base64URL?

Base64URL is a URL-safe Base64 variant used by JOSE formats. It substitutes - and _ for the + and / characters used by standard Base64 and can omit padding.

Does SnakTool accept a two-part JWT?

No. The current decoder requires exactly three nonempty dot-separated sections: header, payload and signature.

Can I edit a JWT payload and keep the original signature?

You can alter encoded data, but the original signature is not thereby valid for the modified protected content. A verifier must cryptographically check the final token before trusting its claims.

What is the maximum JWT size for this decoder?

The current developer-text limit is 1,048,576 UTF-16 code units. A token above that input limit is rejected before decoding.

References

Browse all Developer Tools