UtilitiesVault
100% Client-Side • Secrets Never Leave Your Device

JWT Decoder & Token Inspector

Inspect and debug JSON Web Tokens without security vulnerabilities. Audit decoded payload claims, cryptographic algorithms, and active or expired token states.

Encoded Token
HeaderPayloadSignature
Active (Expires in 65 days on 1/15/2027)
Valid
Header (Algorithm & Type)
{
  "alg": "HS256",
  "typ": "JWT"
}
Payload (Claims & Data)
{
  "sub": "user_123456",
  "name": "Alex Morgan",
  "admin": true,
  "iat": 1704541600,
  "exp": 1800000000
}

Anatomy of a JSON Web Token (RFC 7519)

A JSON Web Token (JWT) is an open standard (RFC 7519) that defines a compact and self-contained method for securely transmitting information between parties as a JSON object. Tokens are commonly utilized in OAuth 2.0, OpenID Connect (OIDC), and stateless REST APIs.

A valid JWT string is composed of three distinct base64url-encoded segments joined by periods (.):

1. Header (Red)

Defines the token type (usually "JWT") and the hashing algorithm used, such as HMAC SHA256 (HS256) or RSA Signature (RS256).

2. Payload (Purple)

Contains the claims: entity statements (such as user ID, email, role, and permission scopes) along with expiration timestamps.

3. Signature (Cyan)

Computed by hashing the encoded header and payload with a private server key to verify the message hasn't been tampered with.

Standard Registered Claims Reference

iss (Issuer)Identifies the authority or authentication server that issued the token.
sub (Subject)The unique principal identifier (e.g. user ID, uuid) the token represents.
aud (Audience)The specific recipient backend services or microservices the token is intended for.
exp (Expiration Time)Unix epoch timestamp after which the token must be rejected by backend APIs.
iat (Issued At)Unix epoch timestamp recording the exact second the token was minted.
nbf (Not Before)Timestamp specifying when the token becomes valid for processing.

Critical Security Rules for JWT Implementation

1. JWTs Are Encoded, Not Encrypted

Base64URL encoding is easily readable by anyone possessing the string. Never store sensitive information such as plaintext passwords, credit card details, or social security numbers in standard JWT payloads. If confidentiality is required, implement JSON Web Encryption (JWE).

2. Guard Against the "alg: none" Vulnerability

Always configure server verification libraries to explicitly require expected algorithms (e.g. RS256 or HS256) and reject tokens specifying "alg": "none".

3. Prefer HttpOnly Secure Cookies Over LocalStorage

Storing session JWTs in browser localStorage exposes tokens to Cross-Site Scripting (XSS) attacks. Storing tokens in HttpOnly, SameSite=Strict cookies prevents JavaScript injection vulnerabilities.

Frequently Asked Questions (FAQ)

How does this tool check if my token is expired?

The tool reads the exp claim (which represents seconds since the Unix epoch: January 1, 1970) and compares it with your computer's current local system clock to determine if the token is active or expired.

Why does the decoder warn about invalid token structure?

A compliant JWT must contain exactly two period characters separating three sections. If you paste an OAuth authorization code or an API Bearer prefix without stripping "Bearer ", the parser will report an invalid token format.

Keep Calculating & Converting

Related Free Online Utilities