Secure JWT Hub
This tool provides a full suite for working with JSON Web Tokens. Whether you need to inspect a token's payload or generate a new one for testing, everything happens entirely on your device.
Safely decode and encode JSON Web Tokens locally. Complete with HS256 signing and signature verification.
This tool provides a full suite for working with JSON Web Tokens. Whether you need to inspect a token's payload or generate a new one for testing, everything happens entirely on your device.
JSON Web Tokens (JWT) are the heart of modern web security and single sign-on (SSO) systems. They allow servers to trust the identity of a user without needing a centralized session database. However, when things go wrong—like a user being logged out unexpectedly—you need to look inside the token. Our JWT Decoder allows you to inspect the header and payload of any token instantly.
Each part is Base64URL encoded. The payload contains user data and 'claims'.
1) Header: Contains metadata about the token, such as the algorithm used for signing (e.g., HS256 or RS256). 2) Payload: The 'Meat' of the token. It contains the claims—data like user ID, username, and permissions. 3) Signature: A cryptographic hash of the first two parts, ensuring that the payload hasn't been altered by an attacker.
Standard JWTs use reserved claim names to provide interoperability. 'exp' (Expiration) tells the server when to stop trusting the token. 'iat' (Issued At) tracks when the token was created. 'sub' (Subject) is usually the unique identifier for the user. Our tool highlights these claims and converts Unix timestamps into human-readable dates for easy debugging.
If your frontend application isn't showing the user as logged in, the first step is to decode the JWT. Check if the Roles/Scopes are correct. Does the token contain 'admin:true'? Is the 'aud' (Audience) claim set to the correct client ID? Many bugs in modern auth flows are caused by simple misconfigurations in the token payload that our inspector makes easy to spot.
It is important to remember that Decoding is not Verifying. Our tool shows you what is inside, but it doesn't prove the token is legitimate. A hacker could easily create a fake JWT with 'admin:true'. The only way to trust a token is by verifying the signature on your backend server using a secret key. Our tool is for debugging the *content* of tokens you already know you are working with.
Checking the roles and expiration.
Why is the user being logged out?
JWT (JSON Web Token) is an open standard (RFC 7519) that defines a compact and self-contained way for securely transmitting information between parties as a JSON object.
A JWT consists of three parts separated by dots: Header, Payload, and Signature. Each part is Base64URL encoded. Our tool decodes these sections to reveal the underlying JSON.
No. Decoding just reveals the information inside. Verification requires checking the signature against a secret key or public certificate to ensure the token hasn't been tampered with.
The 'exp' (Expiration Time) claim identifies the time on or after which the JWT must not be accepted for processing. It is usually a Unix timestamp.
Common reasons include: the token has expired (exp), the 'iat' (issued at) time is in the future, or the signature verification failed on the server.
Standard JWTs are typically 'signed' but NOT encrypted. This means the data is readable by anyone who has the token. For sensitive data, use JWE (JSON Web Encryption).
Claims are pieces of information asserted about a subject (like a user's ID, name, or admin status) within the payload.
They are often stored in LocalStorage or an HttpOnly cookie. For security, HttpOnly cookies are preferred to prevent XSS attacks from stealing the token.
Yes. Our tool is strictly client-side. Your token is never sent to our server; the decoding happens entirely in your browser's JavaScript engine.
It's a variant of Base64 encoding that is safe for URLs (replacing '+' with '-' and '/' with '_').