JWT Decoder Online

Decode JSON Web Tokens (JWT) payload and header values.

Paste JWT Token

Decode JWT Tokens Online

A JSON Web Token (JWT) contains information that applications use to exchange claims between systems. If you are debugging an API request, investigating an authentication issue, or checking a token's contents, a JWT decoder helps you inspect the token in a readable format.

Use this online JWT decoder to decode a JWT token and inspect its header and payload as structured JSON. You can examine information such as the signing algorithm, token type, issuer, subject, audience, and expiration timestamp without manually decoding the Base64URL-encoded data.

Whether you are working with an access token, an ID token, or another JSON Web Token, understanding its structure can make authentication debugging easier. Remember that decoding a token is an inspection step, not proof that the token is genuine or valid.


How to Decode a JWT Token

A JWT token decoder converts the encoded header and payload into readable JSON so you can inspect the information they contain.

Step 1: Copy Your JWT Token

Copy the complete JWT string from your application's authentication response, API debugging environment, or development logs. A typical signed JWT consists of three parts separated by periods.

If your token comes from an HTTP Authorization header, remove the Bearer prefix before pasting the token into the decoder.

Step 2: Paste the Token Into the JWT Decoder

Enter the JWT string into the input field of the decoder. Make sure you copy the complete token without introducing spaces, line breaks, or missing characters.

Step 3: Decode the JWT

Run the decoder to inspect the token's header and payload. The decoded output should display the information in a readable JSON format, making it easier to examine the token's metadata and claims.

Step 4: Inspect the Header and Payload

Review the header to understand the declared token type and signing algorithm. Then inspect the payload to examine the claims, such as the issuer, subject, audience, and expiration time.

Step 5: Investigate Any Issues

If the token does not decode, check whether the string is complete and correctly formatted. If it decodes successfully but an API request still fails, investigate the signature, expiration, issuer, audience, and other validation requirements separately.

What Is a JSON Web Token (JWT)?

A JSON Web Token is a compact format for representing claims that can be transmitted between parties. JWTs are commonly used in authentication systems, API authorization, and identity-related workflows.

A typical signed JWT has three Base64URL-encoded components:

header.payload.signature

Each component serves a different purpose:

  • Header: Contains metadata about the token, commonly including the token type and signing algorithm.
  • Payload: Contains claims, which are statements about a subject or information associated with the token.
  • Signature: Provides a cryptographic mechanism for checking the token's integrity and, depending on the signing method, its origin.
  • For example, a JWT header might contain an algorithm such as HS256, while the payload might contain a subject identifier and an expiration timestamp.

    The header and payload can be decoded without the signing secret. The signature, however, cannot be validated simply by reading the token. Verification requires the appropriate cryptographic key and a trusted validation process.


    What Information Can You See When You Decode a JWT?

    Decoding a JWT reveals the readable contents of its header and payload. These fields help developers understand how a token is structured and what claims it carries.

    JWT Header

    The header describes the token's metadata. A common example is:
    {
      "alg": "HS256",
      "typ": "JWT"
    }
    

    Here, alg identifies the declared signing algorithm, while typ indicates the token type.

    Some tokens also include a kid field, which identifies a key associated with the token's signature. In systems that use multiple signing keys, this identifier can help a verifier select the appropriate public key or secret from a trusted configuration.

    Do not automatically trust the algorithm or key identifier just because it appears in the header. A verifier must enforce its own allowed algorithms and trusted key sources.

    JWT Payload

    The payload contains claims about the token, user, session, or intended recipient. For example:
    {
      "sub": "user-123",
      "iss": "https://auth.example.com/",
      "aud": "example-api",
      "iat": 1760000000,
      "exp": 1760003600
    }
    

    This illustrative payload contains a subject identifier, issuer, audience, issue time, and expiration time. The timestamps are examples, not a currently valid token.

    Claims help applications determine what a token represents and how it should be evaluated. However, decoded values must not be trusted until the token has passed the appropriate verification and validation checks.


    Common JWT Claims Explained

    JWT claims provide information about the token and its intended use. When you decode a JWT online, understanding these fields helps you investigate authentication and authorization issues.

    ClaimMeaning
    issIssuer: the entity that issued the token
    subSubject: the identity or entity the token concerns
    audAudience: the intended recipient or recipients
    expExpiration time, expressed as a NumericDate
    iatTime when the token was issued
    nbfTime before which the token must not be accepted
    jtiIdentifier associated with the token
    kidKey identifier, commonly found in the header
    algDeclared signing algorithm, found in the header
    These claims are not all mandatory in every JWT. Their presence and required values depend on the token profile and the application's security requirements.

    How to Read the JWT Expiration Claim (exp)

    The exp claim specifies the time after which a token must not be accepted, subject to the applicable JWT validation rules and permitted clock-skew handling.

    It uses a NumericDate value, generally represented as seconds since the Unix epoch. A decoder can reveal the raw timestamp, which you can convert into a human-readable date and time.

    If an API rejects a token as expired, inspect the exp value and compare it with the current time. Also consider whether the system has clock synchronization issues or whether the token was issued for a different environment.


    What Do iat and nbf Mean?

    The iat claim indicates when a token was issued. It can help developers investigate token age and issuance behavior.

    The nbf claim indicates the time before which the token must not be accepted. A token may therefore be rejected if it is presented too early.

    Neither claim proves that the token is authentic. Their values must be evaluated within the complete validation process.


    JWT Decode vs. JWT Verification

    Decoding and verification are different operations, and confusing them can lead to security mistakes.

  • JWT decoding reads the encoded header and payload and converts them into a human-readable format. It does not require the signing key for a typical signed JWT.
  • JWT signature verification checks whether the token's signature matches the expected cryptographic calculation using the appropriate secret or public key. Proper validation also includes checking relevant claims and application-specific rules.
  • For example, a token may decode successfully even if someone has modified its payload. Without signature verification, a decoder cannot establish whether the token was issued by a trusted party or whether its contents have been altered.

    When debugging an API, use a JWT decoder to inspect the token, then use your application's trusted authentication middleware or JWT library to verify and validate it.


    Is Decoding a JWT the Same as Decrypting a JWT?

    No. Decoding and decryption are different processes.

    Most JWTs encountered in everyday API authentication are signed tokens, commonly represented as JSON Web Signatures (JWS). Their headers and payloads are encoded using Base64URL, which is a reversible encoding format rather than encryption.

    A signed JWT's payload can therefore be read by anyone who obtains the token. The signature helps detect unauthorized modification; it does not make the payload confidential.

    Encrypted JWTs use JSON Web Encryption (JWE), which is a different format designed to protect confidentiality. Reading an encrypted payload requires the appropriate decryption key and a compatible JWE implementation.

    If you are looking for a JWT decryption tool, first determine whether your token is a signed JWS or an encrypted JWE. A standard JWT decoder that reads JWS header and payload data cannot decrypt an encrypted token merely by decoding Base64URL.


    How to Decode a Bearer Token

    Bearer tokens are commonly sent in HTTP requests using the Authorization header:

    Authorization: Bearer <your-token>
    

    To inspect a JWT bearer token:

  • Copy the token value from your development environment or authorized debugging tools.
  • Remove the Bearer prefix.
  • Paste the remaining token into the JWT decoder.
  • Inspect the header and payload for relevant claims.
  • If the request fails, verify the token using the application's normal security process.
  • Not every bearer token is a JWT. Some systems use opaque tokens that do not follow the three-part JWT structure and cannot be decoded using a JWT decoder.

    Avoid copying active production tokens into tools unless you have confirmed that doing so is permitted and appropriate for your security requirements.


    Common JWT Decoding Errors and How to Fix Them

    If a JWT decoder cannot process your token, check the token format and the source of the value before assuming the token itself is invalid.

    Invalid JWT Format

    A typical compact signed JWT has three segments separated by two periods. If the token is truncated, contains extra characters, or has been copied incorrectly, decoding may fail.

    Check that you have copied the entire token and removed any surrounding quotes or Authorization header prefix.

    Invalid Base64URL Data

    JWT header and payload segments use Base64URL encoding. Incorrect characters, incomplete segments, or malformed data can prevent decoding.

    Copy the token again from its original source and check whether any characters were lost during transmission or formatting.

    Invalid JSON in the Header or Payload

    After decoding, the header and payload should be valid JSON objects for a typical JWT. Malformed JSON may indicate a damaged token or an incorrectly constructed token.

    If you generate the token yourself, inspect the token-generation code and the JSON serialization process.

    Token Decodes but the API Rejects It

    Successful decoding does not guarantee successful authentication. The token may have an invalid signature, an expired exp value, a future nbf value, or an incorrect issuer or audience.

    Check the server's validation logs and confirm that the token meets the API's requirements. Do not disable signature or claim validation just to make a request succeed.


    Why Use an Online JWT Decoder?

    An online JWT decoder can simplify routine development and debugging tasks by turning encoded token data into readable JSON.

  • Inspect Token Claims Quickly: Review claims such as iss, sub, aud, iat, and exp without manually decoding the payload.
  • Debug Authentication Issues: Inspect token structure and claim values when investigating API authorization errors, login problems, or unexpected token behavior.
  • Understand JWT Headers: Examine the declared signing algorithm and other header parameters when investigating how a token is structured.
  • Work With API Access Tokens: Decode JWT-formatted access tokens obtained in an authorized development environment to understand the information they contain.
  • Learn JWT Structure: A decoder can help students and developers understand the relationship between a JWT's header, payload, and signature.

  • JWT Decoder Security: What You Should Know

    JWTs may contain user identifiers, email addresses, roles, permissions, session details, or other sensitive information. Anyone who obtains a typical signed JWT can read its Base64URL-encoded header and payload.

    Follow these precautions when inspecting tokens:

  • Do not publish active access tokens or session tokens.
  • Avoid pasting production credentials into third-party tools unless your security policy permits it.
  • Never share signing secrets or private keys to decode a token.
  • Treat decoded claims as untrusted until the token has been verified and validated.
  • Use trusted libraries and server-side middleware for production authentication.
  • Review the tool's actual data-processing and privacy behavior before using it with sensitive information.
  • A JWT decoder is intended for inspection and troubleshooting. It should not replace secure token verification or production authorization checks.

    Frequently Asked Questions (13)

    Common questions and answers about using JWT Decoder.

    A JWT decoder is a tool that converts a JSON Web Token's encoded header and payload into readable data. Developers use it to inspect token metadata and claims during authentication and API debugging.