JWT Decoder
JWT Decoder decodes JSON Web Tokens directly in your browser using base64url decoding and UTF-8 safe TextDecoder. It reveals the header, payload claims, and signature without uploading data or requiring a secret.
JWT Decoder is a browser-based developer tool designed to decode JSON Web Tokens (JWTs) compliant with RFC 7519. It decodes tokens by applying base64url decoding combined with the TextDecoder API to ensure UTF-8 safety, revealing token components such as the header, payload claims like sub, iss, exp, and signature. Since all processing occurs client-side, no token data is uploaded, preserving your privacy. This tool complements utilities like Base64 Decode and JSON Formatter by helping you inspect JWT contents efficiently and securely.
How to Use JWT Decoder
- Paste your JWT string into the input field of the tool. A JWT typically has three base64url-encoded parts separated by dots.
- The tool automatically splits the token into header, payload, and signature sections.
- It decodes the base64url-encoded header and payload using UTF-8 safe decoding, displaying JSON objects for each.
- View the token claims such as
sub(subject),iss(issuer),iat(issued at), andexp(expiration time). - Check the expiration status based on the current time and the
expclaim if present.
How It Works
JWT Decoder processes tokens client-side using base64url decoding, a variant of base64 encoding that uses URL-safe characters. It applies the TextDecoder API configured for UTF-8 to convert the decoded byte sequences into properly formatted JSON strings, avoiding character corruption. The token's three segments—header, payload, and signature—are separated by periods. The header reveals metadata such as the algorithm (alg) and token type (typ), while the payload contains claims that describe the token's context and validity times. The signature is shown as-is but not verified, since signature verification requires the secret or public key, which the tool does not use to maintain privacy and simplicity. This zero-dependency approach ensures fast, secure decoding entirely in your browser without any network requests.
Example
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwiaXNzIjoiZXhhbXBsZS5jb20iLCJpYXQiOjE2MDAwMDAwMDAsImV4cCI6MTYwMDAwMzYwMH0.dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXkDecoded Output:
Header: {
"alg": "HS256",
"typ": "JWT"
}
Payload: {
"sub": "1234567890",
"iss": "example.com",
"iat": 1600000000,
"exp": 1600003600
}
Signature: dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk
Expiration Status: Expired (if current time is after 1600003600)When to Use JWT Decoder
- As a developer, inspect JWTs during API development to verify payload claims and header algorithms.
- Security analysts can quickly check token expiration and payload data without exposing secrets.
- Frontend engineers can debug authentication flows by viewing token contents client-side.
- Students learning about JWTs can visually understand token structure and encoding methods.
- SEO specialists managing web tokens for user sessions can verify claims like issuer and expiry.
For related tasks, consider using Base64 Decode to decode arbitrary base64url strings or JSON Formatter to beautify decoded JSON output. You might also use Hash Generator when working with JWT signatures or cryptographic hashes.
Frequently Asked Questions
Does JWT Decoder verify the token signature?
No, JWT Decoder does not verify signatures because it does not have access to the secret or public key required for cryptographic verification. It only decodes the base64url-encoded parts and shows the signature as-is.
How does JWT Decoder handle UTF-8 encoded payloads?
JWT Decoder uses the TextDecoder API configured for UTF-8 to convert base64url-decoded byte sequences into correctly encoded JSON strings, ensuring characters beyond ASCII are properly rendered.
Is my JWT data uploaded to a server during decoding?
No, all decoding happens within your browser. JWT Decoder runs client-side with zero dependencies, so no token data is sent over the network, preserving your privacy.
Can JWT Decoder show if a token is expired?
Yes, the tool compares the current Unix timestamp with the exp claim in the payload to indicate whether the token is expired or still valid.
What algorithms does JWT Decoder support in the header?
JWT Decoder simply displays the alg field from the token header, such as HS256 or RS256, but does not validate or enforce any algorithms.