QuickDevTools

JWT Decoder

Decode and inspect JSON Web Tokens. View header, payload, and expiration details without a secret key.

All processing happens in your browser

This tool only decodes the JWT (base64). It does not verify the signature. Never paste tokens containing sensitive data into untrusted tools.

How to Decode JWT Tokens Online

1

Paste your JWT

Copy the full JWT string (the three dot-separated Base64 segments) from your auth header, cookie, or token endpoint response and paste it into the input field.

2

Inspect the decoded parts

The tool splits the token into its three components: the header (algorithm and token type), the payload (claims like user ID, roles, and expiration), and the signature. Each part is displayed as formatted JSON.

3

Check expiration and claims

The tool automatically highlights the exp (expiration), iat (issued at), and nbf (not before) timestamps, converting them to human-readable dates so you can quickly verify if a token is still valid.

Common Use Cases

Debugging authentication failures by inspecting token claims and expiration times

Verifying that your auth server includes the correct roles and permissions in tokens

Checking the signing algorithm (RS256 vs HS256) during OAuth integration

Inspecting ID tokens from OpenID Connect providers to verify user identity claims

Troubleshooting "token expired" errors by comparing exp timestamp with current time

Auditing tokens for excessive claims that could leak sensitive information

JSON Web Tokens: How Modern Authentication Works Under the Hood

JSON Web Tokens have become the de facto standard for stateless authentication in web applications. Understanding how they work — and their security implications — is essential knowledge for any developer building systems that handle user identity. A JWT consists of three parts separated by dots: the header, payload, and signature. The header specifies the signing algorithm (typically RS256 or HS256) and token type. The payload contains claims — standardized fields like "sub" for the user identifier and "exp" for expiration time, plus custom claims your application needs. The signature is a cryptographic hash that proves the token hasn't been tampered with. The key insight that makes JWTs powerful is statelessness. Traditional session-based auth requires the server to store session data and look it up on every request. With JWTs, the token itself contains everything the server needs to authenticate the request. This eliminates the session store bottleneck and makes horizontal scaling trivial — any server instance can validate any token independently. However, this statelessness comes with trade-offs. You cannot revoke a JWT before its expiration without maintaining a blacklist, which partially defeats the purpose. This is why access tokens should be short-lived (5-15 minutes is common) and paired with longer-lived refresh tokens that can be revoked server-side. Security best practices for JWTs include: always verify signatures (never skip this step), validate the "aud" and "iss" claims to prevent token confusion, use RS256 for distributed architectures, keep payloads small to reduce overhead, and transmit tokens only over HTTPS. The "alg: none" attack — where an attacker modifies the header to skip signature verification — remains one of the most common JWT vulnerabilities in poorly implemented systems. When choosing between JWTs and session cookies, consider your architecture. Single-server applications work fine with sessions. Microservices and SPAs benefit from JWTs. Both can be secure when implemented correctly, but JWTs require more careful handling of expiration and revocation.

Frequently Asked Questions

Related Tools