JWT Decoder Online

Paste a JSON Web Token to instantly decode and inspect its header, payload, and signature. View all claims, check expiration status, and copy decoded data. Everything runs locally in your browser — your tokens are never sent to any server.

Color-coded token will appear here...
Header (JOSE)
Decoded header will appear here...
Payload (Claims)
Decoded payload will appear here...
Signature
Signature data will appear here...

Core Capabilities

Instant Decoding

Paste any JSON Web Token and see its decoded header, payload, and signature immediately. The decoder processes your token in real time as you type or paste, with no need to click a button. Each of the three JWT segments is displayed in a distinct color — red for the header, purple for the payload, and cyan for the signature — so you can quickly identify each part. The pretty-printed JSON output uses proper indentation for easy reading, and you can copy any section to your clipboard with a single click. The tool handles tokens of any length and complexity, including those with nested JSON objects and arrays in their claims.

Expiration Checking

Automatically detects the exp (expiration time) claim in the payload and calculates whether the token is still valid or has expired. If the token is valid, you will see a green badge showing exactly how much time remains before expiration, displayed in a human-readable format with days, hours, and minutes. Expired tokens display a red badge with the exact time since expiration. This feature saves you from manually converting Unix timestamps and performing date arithmetic. The iat (issued at) and nbf (not before) timestamps are also converted to readable dates in the claims table for quick reference.

Complete Privacy

Your JSON Web Tokens never leave your device. Every decoding operation happens entirely in your browser using client-side JavaScript. No data is transmitted to any server, stored in any database, or logged anywhere. This is critical for JWT security because tokens often contain sensitive user information, session identifiers, permissions, and authentication data. Unlike server-side JWT decoders that could potentially log or store your tokens, this tool guarantees complete confidentiality. You can verify this by opening your browser's developer tools and monitoring the network tab while decoding tokens — you will see zero outbound requests.

Using JWT Decoder in 4 Steps

  1. Paste your token. Copy a JSON Web Token from your application, API response, browser cookies, local storage, or authorization header and paste it into the input field. The token should be in the standard format with three Base64URL-encoded segments separated by dots. You can also click the Load Sample button to see how the decoder works with an example token.
  2. Review the decoded output. The tool automatically splits the token into its three parts and displays them with color coding. The header section shows the signing algorithm and token type, the payload section reveals all claims and user data, and the signature section displays the raw signature bytes. Check the expiration badge to see if the token is still valid.
  3. Copy and use the data. Click the Copy button on any decoded section to copy the formatted JSON to your clipboard. Use the claims table to quickly reference registered claims like iss, sub, aud, and exp with their human-readable descriptions and converted timestamp values.
Pro Tip

JWT payloads are Base64-encoded, not encrypted. Anyone with access to the token can decode and read the claims. Never store sensitive data like passwords, credit card numbers, or PII in JWT payloads. Use JWE (JSON Web Encryption) if you need encrypted tokens.

Common Mistake

Using expired JWTs without checking the exp claim. Always validate expiration on the server side before granting access. Relying solely on client-side checks is insecure because attackers can modify client code to skip expiration validation.

Who Uses This Tool

Backend Developer

Anya debugs authentication flows in her Node.js microservices. She decodes JWTs from failing API requests to verify that the issuer, audience, and expiration claims are set correctly before tracing the issue to the identity provider configuration.

Security Auditor

Dario inspects tokens during penetration testing engagements. He decodes JWTs to check for overly permissive claims, missing expiration times, and sensitive data exposed in the payload, documenting findings for the security assessment report.

Mobile Developer

Mei implements OAuth 2.0 flows in her React Native app. She decodes access and refresh tokens to verify that scopes match the requested permissions and that token lifetimes align with the app's session management strategy.

Understanding JSON Web Tokens

A JSON Web Token (JWT) is a compact, URL-safe means of representing claims to be transferred between two parties. Defined by RFC 7519, JWTs have become the industry standard for stateless authentication and information exchange in modern web applications and APIs. A JWT consists of three parts separated by dots: the header, the payload, and the signature. Each part is Base64URL-encoded, making the entire token safe for transmission in HTTP headers, URL parameters, and HTML form data.

The header typically contains two fields: alg, which specifies the signing algorithm such as HMAC SHA-256 (HS256) or RSA SHA-256 (RS256), and typ, which is set to "JWT". The header tells the receiving party how the token was signed so it knows which algorithm to use for verification. Some headers also include a kid (key ID) field that identifies which cryptographic key was used, which is useful in systems that rotate signing keys periodically.

The payload contains claims, which are statements about the user and additional metadata. Claims are divided into three categories. Registered claims are predefined and recommended by the JWT specification: iss (issuer) identifies who created the token, sub (subject) identifies the user, aud (audience) identifies the intended recipient, exp (expiration) sets the token's lifetime, iat (issued at) records when the token was created, and nbf (not before) defines the earliest time the token can be used. Public claims are registered in the IANA JSON Web Token Claims registry to prevent naming collisions. Private claims are custom fields agreed upon by the parties exchanging the token, such as user roles, permissions, or profile data.

The signature ensures that the token has not been tampered with in transit. It is created by taking the encoded header, a dot, the encoded payload, and signing the concatenation with a secret key (for HMAC algorithms) or a private key (for RSA or ECDSA algorithms). The receiving server verifies the signature using the shared secret or the corresponding public key. Note that this client-side decoder does not verify signatures because it does not have access to the signing key — it only decodes and displays the token contents.

Frequently Asked Questions

What is a JSON Web Token (JWT)?

A JSON Web Token is an open standard (RFC 7519) that defines a compact and self-contained way to securely transmit information between parties as a JSON object. A JWT is composed of three parts separated by dots: a header that specifies the algorithm and token type, a payload that contains the claims (data), and a signature that ensures the token has not been altered. JWTs are widely used for authentication and authorization in web applications. When a user logs in, the server issues a JWT that the client stores (usually in local storage or a cookie) and sends with each subsequent request. The server verifies the token's signature to confirm the user's identity without needing to query a session database. This stateless approach makes JWTs particularly well-suited for distributed systems, microservices, and single-page applications where server-side session management is impractical or undesirable.

Is it safe to decode my JWT here?

Yes, this JWT decoder is completely safe to use with real tokens. All decoding happens locally in your web browser using client-side JavaScript. Your token is never transmitted to any external server, stored in any database, or logged in any way. The tool simply splits the token at the dot separators, decodes each Base64URL-encoded segment, and parses the resulting JSON. You can verify this by disconnecting from the internet after loading the page — the decoder continues to work perfectly because it requires no server communication. That said, you should always be cautious about where you paste your tokens in general. Avoid sharing JWTs in public forums, chat messages, or unencrypted channels because anyone who obtains a valid token can use it to impersonate the token holder until it expires. This decoder is designed with security in mind, making it a safe alternative to server-based tools.

What is the difference between JWT and session-based authentication?

Session-based authentication stores user session data on the server, typically in a database or in-memory store like Redis. The server issues a session ID cookie that the client sends with each request. The server looks up the session ID to retrieve user data. JWT authentication, by contrast, is stateless. The server encodes user data directly into the token and sends it to the client. On subsequent requests, the server verifies the token's signature and reads the claims without querying any database. JWTs are particularly advantageous for distributed architectures because any server that has the signing key can validate the token independently. Session-based authentication requires a shared session store when running multiple server instances. However, JWTs have trade-offs: they cannot be individually revoked before expiration (without a blacklist), they increase request size compared to a small session cookie, and sensitive data in the payload is only encoded, not encrypted, so it should not contain secrets.

What are the most common JWT claims?

The JWT specification defines seven registered claims that are commonly used. The iss (issuer) claim identifies the party that issued the token, such as your authentication server's URL. The sub (subject) claim identifies the principal (usually the user ID) that the token represents. The aud (audience) claim identifies the intended recipients of the token, often the API server's URL. The exp (expiration time) claim sets a Unix timestamp after which the token must be rejected. The iat (issued at) claim records when the token was created. The nbf (not before) claim specifies the earliest time the token should be accepted. The jti (JWT ID) claim provides a unique identifier for the token, useful for preventing replay attacks. In addition to these standard claims, applications commonly include custom claims such as name, email, role, or permissions to carry user-specific data that the application needs on each request.

How large can a JWT be?

There is no hard size limit defined in the JWT specification itself, but practical limits are imposed by the transport mechanisms. Most web servers and CDNs limit HTTP header sizes to between 4 KB and 16 KB. Since JWTs are typically sent in the Authorization header, a token larger than 8 KB may cause issues with certain servers, proxies, or load balancers. In practice, most JWTs range from 300 bytes to 2 KB depending on the number of claims. Each claim you add increases the token size, and the Base64URL encoding adds approximately 33 percent overhead compared to the raw JSON. To keep tokens small, include only the claims your application actually needs on each request, avoid storing large data structures or lists in claims, and consider using token references (opaque tokens) alongside JWTs when you need to associate large amounts of session data. Cookies have a strict 4 KB limit per cookie, so if you store JWTs in cookies, that becomes the effective maximum size.

Can a JWT be decoded without the secret key?

Yes, the header and payload of a JWT can always be decoded without the secret key because they are simply Base64URL-encoded, not encrypted. Anyone who possesses a JWT can read its contents by decoding the Base64URL segments — that is exactly what this tool does. The secret key (or private key) is only needed to create or verify the signature, not to read the token contents. This is an important security consideration: you should never store sensitive secrets, passwords, or confidential data directly in a JWT payload because they would be readable by anyone who intercepts the token. If you need to transmit sensitive data, use JSON Web Encryption (JWE) instead of a plain JWT, or encrypt specific claim values before placing them in the payload. The signature's purpose is to guarantee integrity (the token was not modified) and authenticity (the token was issued by a trusted party), not to provide confidentiality.

What signing algorithms do JWTs support?

JWTs support a wide range of signing algorithms defined in the JSON Web Algorithms (JWA) specification (RFC 7518). The most commonly used algorithms are HS256, HS384, and HS512, which use HMAC with SHA-256, SHA-384, or SHA-512 respectively. These are symmetric algorithms, meaning the same secret key is used for both signing and verification. RS256, RS384, and RS512 use RSA with the corresponding SHA hash functions. These are asymmetric algorithms where a private key signs the token and a public key verifies it, making them ideal for distributed systems where verification parties should not have signing capability. ES256, ES384, and ES512 use ECDSA (Elliptic Curve Digital Signature Algorithm) and produce shorter signatures than RSA for equivalent security levels. PS256, PS384, and PS512 use RSASSA-PSS, a probabilistic RSA padding scheme considered more secure than PKCS#1 v1.5. The none algorithm creates unsigned tokens and should only be used in trusted development environments, never in production.

JWT Token Structure Explained

A JSON Web Token consists of three Base64URL-encoded parts separated by dots. Understanding each part helps you debug authentication issues, verify claims, and identify security problems in your token flow.

Header
{
  "alg": "HS256",
  "typ": "JWT"
}

alg — The signing algorithm used. Common values: HS256 (HMAC-SHA256, symmetric), RS256 (RSA-SHA256, asymmetric), ES256 (ECDSA-SHA256).

typ — Token type, almost always "JWT". Some systems omit this field entirely since it is implied by context.

Payload
{
  "sub": "1234567890",
  "name": "John Doe",
  "iat": 1516239022,
  "exp": 1516242622
}

sub — Subject identifier, typically the user ID.

iat — Issued-at time as a Unix timestamp.

exp — Expiration time. The token is invalid after this timestamp.

Custom claims — Any additional data your application needs (roles, permissions, tenant ID).

Signature
HMACSHA256(
  base64UrlEncode(header) + "." +
  base64UrlEncode(payload),
  secret
)

The signature verifies the token has not been tampered with. It is computed by signing the encoded header and payload with a secret key (HS256) or private key (RS256).

Important: This tool decodes the header and payload without verifying the signature. Never trust a JWT payload in production without server-side signature verification.

Security reminder: The payload is only Base64URL-encoded, not encrypted. Anyone with the token can read the claims. Never store sensitive data like passwords or credit card numbers in a JWT. Use JWE (JSON Web Encryption) if the payload itself must be confidential.

Related Tools

Sources & References