JWT Decoder
Decode and inspect JSON Web Tokens
Tool Overview
The JWT Decoder allows you to decode and inspect JSON Web Tokens (JWT). JWTs are commonly used for authentication and authorization in web applications. This tool helps you view the token's header, payload, and verify its structure.
Go to ToolHow It Works
JWT (JSON Web Token) consists of three Base64-encoded parts separated by periods for secure transmission and authentication.
JWT Structure
Component Breakdown
- Header: Base64-encoded JSON containing:
alg: Algorithm used for signing (e.g., HS256, RS256)typ: Token type (typically "JWT")
- Payload: Base64-encoded JSON containing claims:
iss: Issuer of the tokensub: Subject of the tokenexp: Expiration time (Unix timestamp)iat: Time the token was issuedaud: Audience the token is intended for
- Signature: Digital signature computed using the header-specified algorithm.
- Metadata: Auto-generated information derived from the payload:
token_status: Current status (Valid, Expired, or Not Yet Valid)issued_at: Human-readable issued timestampexpires_at: Human-readable expiration timestamptime_remaining: Time remaining until expiration (e.g., "5d 3h 12m")
Decoding Process
- Split: The token is split at each period into three parts.
- Base64 Decode: Each part is decoded using Base64 URL-safe decoding.
- JSON Parse: The decoded strings are parsed into JSON objects.
- Display: The header and payload are displayed with syntax highlighting.
Important Notes
The tool also checks for common JWT structure issues and provides error messages for invalid tokens. Users should verify signatures using the appropriate public key in production environments.
Features
- Decode JWT header and payload
- Display decoded JSON with syntax highlighting
- Show token expiration status
- Display common claims (exp, iat, iss, sub, aud)
- Copy decoded content to clipboard
Usage Examples
Example 1: Decode Standard JWT
Input:
Output:
Example 2: Token with Expiration
Input:
Output:
FAQ
What is a JWT?
JSON Web Token (JWT) is an open standard (RFC 7519) that defines a compact and self-contained way for securely transmitting information between parties as a JSON object.
Does the decoder verify the token signature?
The tool decodes and displays the token content but does not verify the digital signature. For full verification, you need the secret or public key used to sign the token.
What are common JWT claims?
Common claims include: exp (expiration time), iat (issued at), iss (issuer), sub (subject), and aud (audience).