100% Private
No Signup
Free Forever
One of 64 free AI tools by Mahmoud Zalt.
Free JWT Decoder
Decode JWT tokens instantly|4.9 (1,836)
Paste a JSON Web Token and instantly decode it to inspect the header, payload, and signature as defined by RFC 7519. See the algorithm (HS256, RS256, ES256), registered claims (sub, iat, exp, iss, aud, nbf, jti), expiration status, and issued date, all processed locally in your browser. JWTs are the backbone of modern authentication in OAuth 2.0, OpenID Connect, and API authorization flows, and this tool lets you debug them without exposing sensitive token data to third-party services. No server, no signup, no data sent anywhere, your tokens stay on your device.
Free and provided as is, without warranty. Use at your own risk. Terms
What Is a JWT Token and Why Decode It?
JSON Web Tokens (JWTs) are the standard way modern web applications handle authentication and authorization. Defined by RFC 7519, a JWT is a compact, URL-safe string consisting of three Base64url-encoded parts separated by dots: a header that specifies the signing algorithm (such as HS256, RS256, or ES256), a payload containing claims about the user or session, and a cryptographic signature that ensures the token has not been tampered with. When you log in to an application, the server creates a signed JWT containing your user ID, permissions, and expiration time, and this token is sent with every subsequent API request.
Decoding a JWT lets you see exactly what claims it contains, which user it belongs to (the "sub" claim), when it was issued ("iat"), when it expires ("exp"), who issued it ("iss"), and who it is intended for ("aud"). This is essential for debugging authentication issues during development, verifying that token payloads contain the correct permissions and scopes, and understanding the OAuth 2.0 and OpenID Connect flows used by identity providers like Auth0, Firebase, AWS Cognito, and Okta.
JWT Security Considerations and Best Practices
While JWTs are widely used and well-specified, they require careful handling. The token payload is only Base64url-encoded, not encrypted, anyone who intercepts a JWT can decode it and read the claims. This is why JWTs should always be transmitted over HTTPS and stored securely (in httpOnly cookies or short-lived memory, not localStorage). Short expiration times (5-15 minutes) combined with refresh tokens limit exposure if a token is compromised. The signing algorithm should be explicitly validated on the server side to prevent "none" algorithm attacks where an attacker strips the signature entirely.
Choosing the right signing algorithm matters. HS256 (HMAC-SHA256) uses a shared secret, which is simple but means every service that needs to verify tokens must have the secret. RS256 (RSA-SHA256) and ES256 (ECDSA P-256) use asymmetric key pairs, the auth server signs with a private key, and any service can verify with the published public key. This is the preferred approach for microservices and distributed systems. Identity providers publish their public keys at a JWKS (JSON Web Key Set) endpoint, allowing services to verify tokens without sharing secrets.
Common JWT Usage Patterns in Modern Applications
JWTs are the token format specified by the OAuth 2.0 and OpenID Connect standards, making them the backbone of modern authentication. In a typical OAuth 2.0 flow, a user authenticates with an identity provider (like Google, Auth0, or AWS Cognito), which issues an access token (authorizing API requests) and an ID token (containing user profile information), both as JWTs. Single-page applications and mobile apps store these tokens and attach them to API requests via the Authorization header, enabling stateless authentication across distributed backend services.
Beyond authentication, JWTs are used in API gateways (AWS API Gateway, Kong, Cloudflare Access) to enforce authorization policies at the edge before requests reach backend services. They are used in service-to-service communication within microservice architectures to propagate user context without centralized session storage. They also appear in webhook signatures, email verification links, and password reset tokens where a self-contained, tamper-proof payload is needed. Understanding the structure and claims of these tokens is essential for any developer working with modern web APIs.
The debugging session this tool actually gets used in
The most common trigger is a 401 Unauthorized that should not be happening: pasting the token being sent shows immediately whether the "exp" claim has already passed, whether the "aud" claim matches the API being called, or whether a role or permission claim the backend expects is simply missing from the token. That single check often resolves in seconds what would otherwise mean adding logging to a server and reproducing the request.
It also comes up when comparing tokens across environments, a token minted in staging carries different issuer and audience claims than production, and a misconfigured client pointed at the wrong environment produces exactly the confusing, intermittent auth failures that decoding both tokens side by side makes obvious immediately. Webhook debugging follows the same pattern: decoding a signed JWT a provider sent confirms what claims and timestamp it actually carries before you trust the payload in your handler.
JWT vulnerabilities worth knowing beyond signature forgery
The algorithm confusion attack exploits servers that trust the "alg" field in the token itself: if a server is configured to accept both RS256 and HS256 and an attacker knows the RS256 public key, they can craft a token signed with HS256 using that public key as the HMAC secret, tricking a naive verifier into accepting it as valid. The fix is always the same: pin the expected algorithm on the server side rather than trusting whatever the token claims to be signed with.
A weak HS256 secret is a separate, equally real risk, since HS256 verification is just HMAC with a shared string, a short or guessable secret can be brute-forced offline once an attacker has a single valid token to test against. This is exactly why RS256 or ES256, where only the private key can sign and the public key only verifies, is generally preferred for anything beyond a small, trusted, single-service system.
When a JWT is the wrong tool
The tradeoff JWT advocates often gloss over is revocation: because the server verifies a signature rather than looking up a session, there is no built-in way to invalidate a single JWT before it naturally expires, a user cannot truly be "logged out" server-side without maintaining a denylist, which reintroduces the very database lookup JWTs were meant to avoid. For applications where instant, reliable logout and session revocation genuinely matter, like banking, healthcare, or anything with a strict security posture, traditional server-side sessions with a fast lookup store like Redis remain a reasonable, arguably better default.
JWTs earn their keep specifically in stateless, horizontally scaled, multi-service scenarios where avoiding a shared session store is the actual goal. If your application is a single monolith talking to one database, a session cookie is simpler, easier to revoke, and avoids the entire class of signature and algorithm bugs a JWT-based system has to defend against.
How It Works
Paste your JWT token into the input field.
Click Decode to view the header, payload, and signature.
Check expiration status and copy individual sections.
Need expert help with AI?
Looking for a specialist to help integrate, optimize, or consult on AI systems? Book a one-on-one technical consultation with an experienced AI consultant to get tailored advice.
Key Features
Privacy & Trust
Use Cases
Limitations
- Cannot verify signatures, verification requires the secret key or public key used to sign the token
- Does not support JWE (JSON Web Encryption), only decodes signed JWTs (JWS)
- Only decodes standard Base64url-encoded JWTs with three dot-separated parts
- Does not validate token claims against an authorization server
- Nested JWTs (a JWT inside a JWT payload) are displayed as raw strings
Frequently Asked Questions
What is a JSON Web Token (JWT)?
A JSON Web Token (JWT, pronounced "jot") is a compact, URL-safe token format defined by RFC 7519. It consists of three Base64url-encoded parts separated by dots: a header specifying the signing algorithm and token type, a payload containing claims about the user or session, and a cryptographic signature that proves the token has not been tampered with. JWTs are the standard token format for OAuth 2.0 access tokens, OpenID Connect ID tokens, and stateless API authentication. They allow servers to verify a user's identity and permissions without querying a database on every request.
What are the common JWT claims and what do they mean?
RFC 7519 defines seven registered claims: "sub" (subject, the user or entity the token represents), "iss" (issuer, who created the token, e.g., your auth server URL), "aud" (audience, the intended recipient, e.g., your API), "exp" (expiration time, when the token becomes invalid), "nbf" (not before, the earliest time the token is valid), "iat" (issued at, when the token was created), and "jti" (JWT ID, a unique identifier to prevent replay attacks). Beyond these, tokens often include custom claims like "email," "name," "roles," or "scope" that carry application-specific data. This decoder displays all of them.
What signing algorithms do JWTs use?
JWTs support several signing algorithms defined by the JSON Web Algorithms (JWA) specification. HS256 (HMAC-SHA256) is a symmetric algorithm where the same secret key signs and verifies the token, simple but requires sharing the secret. RS256 (RSA-SHA256) is asymmetric, using a private key to sign and a public key to verify, ideal for distributed systems where multiple services need to validate tokens. ES256 (ECDSA P-256) offers similar asymmetric security with smaller keys and faster verification. PS256 uses RSA-PSS padding for improved security. EdDSA (Ed25519) is the newest option, offering excellent performance and compact signatures. This decoder reads the "alg" field from the header and displays it alongside the decoded payload.
Is it safe to decode production tokens in this tool?
Yes. All decoding happens entirely in your browser using JavaScript, no token data is transmitted to any server, logged, or stored. You can verify this by opening the Network tab in your browser DevTools while decoding a token. That said, a decoded JWT payload may contain personally identifiable information like email addresses, user IDs, or role assignments, so you should still avoid pasting decoded contents into public forums, screenshots, or chat messages. The token itself is only as safe as your browser session.
Q&A SESSION
Got a quick technical question?
Skip the back-and-forth. Get a direct answer from an experienced engineer.