decode_jwt
Decode a JWT to view its header and payload. Inspect claims such as expiry, subject, and issuer for debugging authentication issues.
Instructions
Decode a JWT (JSON Web Token) without signature verification.
Parses and decodes the header and payload sections of a JWT for inspection.
Useful for debugging authentication issues, inspecting claim values, or
checking expiry. Does NOT verify the signature — do not use this to make
security decisions about whether a token should be trusted.
Args:
token: JWT string (three base64url-encoded sections separated by dots).
Both compact and bearer format ('Bearer eyJ...') are accepted.
Returns:
header: Decoded JWT header (alg, typ, kid).
payload: Decoded JWT payload (all claims as-is).
is_expired (bool): True if the 'exp' claim is in the past.
expires_at: Expiry datetime string if 'exp' claim present (may be null).
issued_at: Issue datetime string if 'iat' claim present (may be null).
subject: The 'sub' claim if present (typically a user ID).
issuer: The 'iss' claim if present.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| token | Yes |