# JWT Decoder

> Decode and inspect JSON Web Tokens to view their header, payload, and signature.

Canonical: https://toolshub.tech/developer-tools/jwt-decoder

## How to Use

1. Paste your JWT token into the input field (the full token including all 3 parts)
2. Click 'Decode JWT' to parse the token
3. View the decoded Header (algorithm and token type) and Payload (claims)
4. The Signature is shown separately — note it cannot be verified without the secret key
5. Use Clear to reset and decode a new token

## Common Use Cases

- Debug authentication issues by inspecting JWT claims and expiration times
- Verify the algorithm and token type in the JWT header during API development
- Inspect user roles, permissions, and custom claims in access tokens
- Check token expiration (exp claim) to diagnose session timeout issues
- Understand the structure of JWTs from third-party identity providers (Auth0, Cognito, etc.)

## What is JWT Decoder?

A JWT Decoder is a tool that parses and displays the contents of a JSON Web Token (JWT). JWTs are widely used in modern web authentication — they encode user identity, permissions, and session information in a compact, URL-safe format. Decoding a JWT reveals its header (algorithm and token type) and payload (claims like user ID, email, roles, and expiration time).

## How JWT Decoder Works

A JWT has three parts separated by dots: Header.Payload.Signature. Each part is Base64URL-encoded. This tool decodes the first two parts (header and payload) from Base64URL and parses them as JSON, displaying them in a readable, formatted view. The signature part is shown as-is since verifying it requires the secret or public key.

## Why Use JWT Decoder?

JWT decoding is essential for debugging authentication flows, understanding token contents, and diagnosing issues like expired tokens, missing claims, or incorrect permissions. Instead of manually decoding Base64 and parsing JSON, this tool gives you an instant, formatted view of any JWT's contents.

## Tips & Best Practices

- Check the 'exp' claim to see when a token expires — it's a Unix timestamp (seconds since epoch)
- The 'iat' claim shows when the token was issued, 'nbf' shows when it becomes valid
- Never use JWT decoding to 'verify' a token — only the server with the secret key can do that
- If you see 'alg: none' in the header, that's a security red flag — the token has no signature

## Frequently Asked Questions

### What is a JWT?

A JSON Web Token (JWT) is a compact, URL-safe token format used for securely transmitting information between parties. It consists of three Base64URL-encoded parts: Header (algorithm), Payload (claims), and Signature — separated by dots.

### Can this tool verify JWT signatures?

No. Signature verification requires the secret key (for HMAC algorithms) or the public key (for RSA/ECDSA). This tool only decodes the header and payload — it cannot confirm whether the token is authentic or unmodified.

### Is it safe to paste my JWT here?

Use caution. JWTs often contain sensitive information like user IDs, emails, and roles. This tool processes everything in your browser — your token is never sent to a server — but avoid pasting production tokens with highly sensitive data into any online tool.

### What does the 'exp' claim mean?

The 'exp' (expiration time) claim is a Unix timestamp indicating when the token expires. If the current time is past this value, the token is expired and should be rejected by the server.

### What's the difference between JWT and session cookies?

Session cookies store a session ID on the server; the server looks up the session data for each request. JWTs are self-contained — all the information is in the token itself, making them stateless and suitable for distributed systems and APIs.

## Related

- [Developer Tools](https://toolshub.tech/developer-tools)
- [Base64 Encoder](https://toolshub.tech/developer-tools/base64-encoder)
- [JSON Formatter](https://toolshub.tech/developer-tools/json-formatter)
- [URL Encoder](https://toolshub.tech/developer-tools/url-encoder)
- [UUID Generator](https://toolshub.tech/utility-tools/uuid-generator)
