HMAC Symmetric
HS256, HS384, HS512 use a shared secret key for both signing and verification. Fast and simple — ideal when the same server issues and verifies tokens. The secret must be kept private on all parties that need to verify the token.
Decode, inspect, verify, and generate JSON Web Tokens — entirely in your browser
A JSON Web Token (JWT, pronounced "jot") is a compact, URL-safe token format defined by RFC 7519. JWTs provide a standardized way to securely transmit information between parties as a JSON object. The information is digitally signed, so it can be verified and trusted by the recipient.
JWTs are the backbone of modern authentication and authorization systems. When you log into a web application, the server typically issues a JWT that your browser stores and sends with each subsequent request. The server can verify the token's signature without querying a database, making JWTs ideal for stateless, scalable architectures.
Unlike session cookies that require server-side storage, JWTs are self-contained — they carry all the necessary information within the token itself. This makes them popular for single sign-on (SSO), API authentication, microservice communication, and mobile app backends.
Every JWT consists of three parts separated by dots (.): the header, the payload, and the signature. Each part is Base64URL-encoded, making the token URL-safe and compact enough to include in HTTP headers, query parameters, or POST bodies.
The header typically contains two fields: alg (the signing algorithm, such as HS256 or RS256) and typ (the token type, always "JWT"). The header is Base64URL-encoded to form the first segment of the token.
The payload contains the claims — statements about the user and additional metadata. Claims can be registered (standardized names like sub, exp, iat), public (custom names that should be collision-resistant), or private (agreed upon between parties). The payload is Base64URL-encoded but not encrypted — anyone with the token can read its contents.
The signature is created by taking the encoded header, the encoded payload, a secret key (for HMAC) or a private key (for RSA/ECDSA), and signing them with the algorithm specified in the header. The signature ensures that the token hasn't been tampered with. If any part of the header or payload changes, the signature will no longer match.
RFC 7519 defines a set of registered claim names that provide a common vocabulary for token metadata. While none are mandatory, using these standardized names ensures interoperability between different systems and libraries.
| Claim | Full Name | Description |
|---|---|---|
iss |
Issuer | Identifies the entity that issued the JWT (e.g., your auth server URL) |
sub |
Subject | Identifies the subject of the JWT (typically the user ID) |
aud |
Audience | Identifies the recipients the JWT is intended for (e.g., API endpoint) |
exp |
Expiration Time | Unix timestamp after which the JWT must not be accepted |
nbf |
Not Before | Unix timestamp before which the JWT must not be accepted |
iat |
Issued At | Unix timestamp when the JWT was created |
jti |
JWT ID | Unique identifier for the JWT, used to prevent token replay |
HS256, HS384, HS512 use a shared secret key for both signing and verification. Fast and simple — ideal when the same server issues and verifies tokens. The secret must be kept private on all parties that need to verify the token.
RS256, RS384, RS512 use a private key for signing and a public key for verification. Ideal for distributed systems where multiple services need to verify tokens without accessing the signing key.
ES256, ES384, ES512 use elliptic curve cryptography for shorter keys and signatures compared to RSA, while providing equivalent security. Increasingly popular in mobile and IoT applications where bandwidth matters.
exp claim to limit token lifetime. Short-lived tokens (15 minutes to 1 hour) reduce the window of opportunity if a token is compromised. Use refresh tokens for longer sessions.alg claim on the server side. Do not let the token dictate which algorithm to use for verification — this prevents algorithm-switching attacks.aud claim — Set and validate the audience claim to prevent tokens intended for one service from being accepted by another.exp, iat, nbf) are automatically converted to local date/time with relative time indicators.exp claim are automatically checked against the current time. A visual badge instantly shows whether the token is valid, expiring soon, or expired.sub, iat, exp) speed up the process.A JSON Web Token (JWT) is a compact, URL-safe token format defined by RFC 7519. It consists of three Base64URL-encoded parts separated by dots: a header (metadata and algorithm), a payload (claims about a user or entity), and a signature (cryptographic proof of integrity). JWTs are widely used for authentication and authorization in web applications and APIs.
Yes. This tool processes everything entirely in your browser using JavaScript. Your token is never transmitted to any server. You can verify this by checking the browser's network tab — no requests are made when you decode or generate a token. The tool works offline after the initial page load.
This tool can decode JWTs signed with any algorithm, since decoding only requires Base64URL parsing. For signature verification and token generation, HMAC-based algorithms are supported: HS256 (HMAC-SHA256), HS384 (HMAC-SHA384), and HS512 (HMAC-SHA512). RSA and ECDSA verification require private/public key pairs which are not currently supported in this browser-based tool.
Yes. JWT headers and payloads are Base64URL-encoded, not encrypted. You can always decode and read the contents of any JWT without the secret key. The secret key is only needed to verify the signature (confirming the token hasn't been tampered with) or to generate new tokens.
Encoding (like Base64URL) transforms data into a different format for safe transport — it's reversible by anyone, and provides no security. Encryption transforms data so that only someone with the correct key can read it. Standard JWTs are encoded and signed but not encrypted, which means anyone can read the payload. If you need encrypted tokens, look into JWE (JSON Web Encryption, RFC 7516).
If the exp (expiration) claim in the token's payload contains a Unix timestamp that is in the past, the token has expired. This is a normal security mechanism — tokens are designed to expire after a set period. You'll need to obtain a new token from the issuing server, typically by refreshing your session or re-authenticating.