JWT Decoder
Decode and inspect JWT tokens. View header, payload, and expiration info.
About JSON Web Tokens (JWT)
JSON Web Tokens (JWT) are the industry standard for stateless authentication in modern web applications, APIs, and microservices. Defined in RFC 7519, a JWT is a compact, URL-safe token that carries claims between two parties. JWTs are widely used in OAuth 2.0, OpenID Connect, and single sign-on (SSO).
JWT Structure: Header, Payload, Signature
Every JWT has three Base64URL-encoded parts separated by dots: header.payload.signature. The header specifies the signing algorithm (HS256, RS256, ES256) and token type. The payload contains claims — standard ones like iss (issuer), exp (expiration), sub (subject), and iat (issued at), plus custom claims like user roles. The signature is a cryptographic hash signed with a secret (HMAC) or private key (RSA/ECDSA).
Why Decode JWT Tokens?
Decoding a JWT is essential when debugging authentication flows: verifying the payload contains the correct user ID and roles, checking the exp claim for expiration, inspecting iss and aud claims to confirm the token issuer, and validating the algorithm in the header matches your server's expectations (to prevent algorithm confusion attacks).
JWT Security Best Practices
JWTs are Base64-encoded, not encrypted — anyone with the token can read the payload. Never store passwords or credit card numbers in claims. Always verify signatures server-side. Set short expiration times (15–60 min for access tokens) and use refresh tokens for long sessions. Prefer RS256 (asymmetric) over HS256 (symmetric) in distributed systems.
This decoder runs entirely in your browser. Your tokens are never sent to any server — paste, inspect claims, and check expiration safely. Works with tokens from Auth0, Firebase Auth, AWS Cognito, Keycloak, and any OAuth 2.0 provider.