JWT Decoder - Debug Tokens Without Sharing Your Secrets
Paste a JWT and see what's inside. Everything runs locally in your browser, so your tokens stay private. Essential when troubleshooting authentication flows or when you need to quickly inspect claims without writing code.
What is JWT?
JWT (JSON Web Token, pronounced "jot") is a compact token format defined in RFC 7519. It carries a JSON payload encoded in Base64URL and signed with a secret or key pair, letting servers trust the data without a database lookup. You'll find JWTs powering login sessions, API keys, and OAuth flows across the web.
What This Tool Does
- Decodes any JWT right in your browser - nothing sent to a server
- Shows header, payload, and signature in separate panels
- Converts timestamps (exp, iat, nbf) to human-readable dates - for Unix timestamp work, use our timestamp converter
- Warns you if the token is expired
- Handles HS256, RS256, and other common hashing algorithms
JWT in Microservices Architecture
In microservices architecture, JWT plays a crucial role in enabling secure communication between services:
- Stateless Authentication: Each microservice can independently validate tokens without calling a centralized auth service, reducing load and latency
- Service-to-Service Communication: JWT allows secure propagation of user context across the service call chain
- API Gateway: Gateway validates JWT once and passes decoded claims to downstream services
- Horizontal Scaling: No server-side state makes scaling simple - any instance can handle any request
- Unified Authorization: Roles and permissions in the token enable consistent access control across all services
JWT Best Practices for Microservices
- Short Expiration: Use access tokens with 5-15 minute exp and refresh tokens for renewal
- Asymmetric Keys: RS256/ES256 for production - private key only on auth service, public key on all consumers
- Minimal Payload: Store only essential claims - user_id, roles, tenant_id. Fetch details separately
- Audience Validation: Specify aud claim to prevent token misuse across different services
- Token Revocation: Implement a blacklist for critical scenarios (logout, password change)
When You'll Need This Tool
- Debugging "401 Unauthorized" API errors
- Checking what claims your backend actually sends
- Verifying token expiration during development
- Learning how JWT structure works
- Quick inspection without writing code