JWT Decoder

JWT Decoder

Decode a JSON Web Token header and payload in your browser.

Status: Waiting for input

Intro

Decode a JSON Web Token header and payload in your browser so you can inspect its contents more easily.

  • A JWT decoder helps you read the parts of a token without manually splitting or Base64-decoding it by hand.
  • This is useful when you need to inspect claims, check expiration times, confirm issuers or audiences, troubleshoot authentication problems, or understand how a token is structured.
  • Your current page already presents the tool as a browser-based JWT decoder for the header and payload, with short sections on what it is, why to use it, and common use cases.

This tool is especially useful when you want to:

  • inspect bearer tokens from APIs
  • check token expiration
  • review claims and metadata
  • debug authentication problems
  • confirm issuer or audience values
  • understand JWT structure more clearly

What Is a JWT?

JWT stands for JSON Web Token.

A JWT is a compact token format commonly used in:

  • authentication systems
  • APIs
  • single sign-on workflows
  • session handling
  • identity platforms
  • web applications

A JWT usually contains three parts separated by dots:

  • header
  • payload
  • signature

The current page already explains that a JWT decoder helps read the contents of a JSON Web Token by decoding its header and payload in the browser.

A typical JWT looks something like this:

eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkFsaWNlIiwicm9sZSI6ImFkbWluIiwiZXhwIjoxNzAwMDAwMDAwfQ.signature-placeholder

A JWT has three dot-separated parts: the header, the payload, and the signature.

If you want it to look more educational, use this version instead:

header.payload.signature

and then immediately below it:

eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkFsaWNlIiwicm9sZSI6ImFkbWluIiwiZXhwIjoxNzAwMDAwMDAwfQ.signature-placeholder

That gives the reader both the simple structure and a realistic example.

What Does a JWT Decoder Do?

A JWT decoder takes the token and makes the readable parts easier to inspect.

It typically helps you view:

  • the header
  • the payload
  • standard claims
  • custom claims
  • expiration and timing values
  • issuer and audience fields

This makes it easier to understand what the token contains without having to decode each part manually.

A decoder is especially helpful during development and troubleshooting, when you want to know whether the token contains the values you expected.

JWT Structure Explained

Header

The header usually describes the token type and signing algorithm.

Common header fields include:

  • typ
  • alg

This tells you how the token says it was created.

Payload

The payload contains claims, which are pieces of data stored inside the token.

These may include:

  • user identifiers
  • roles
  • permissions
  • issuer information
  • audience information
  • expiration timestamps
  • application-specific metadata

Signature

The signature is used to help verify that the token has not been altered.

A decoder can usually show the header and payload clearly, but simply decoding a JWT does not prove that the token is valid or trusted.

That distinction is important and should be explained clearly on the page.

Why Use a JWT Decoder?

JWTs are common in authentication and API workflows, but they are not easy to inspect at a glance.

A decoder helps you:

  • read claims quickly
  • confirm the token structure
  • check expiration details
  • inspect issuer and audience values
  • understand what an API or auth provider is sending
  • troubleshoot login and authorization issues

Common JWT Claims

exp

JWT payloads often include standard claims.

The expiration time.

Use this to check whether the token has expired.

iat

The issued-at time.

This helps show when the token was created.

nbf

The “not before” time.

This tells you when the token becomes valid.

iss

The issuer.

This identifies who created or issued the token.

aud

The audience.

This identifies who the token is intended for.

sub

The subject.

This often identifies the user or entity the token represents.

In many real applications, you may also see custom claims such as:

  • roles
  • tenant IDs
  • scopes
  • permissions
  • app-specific identifiers

Common Use Cases

Debugging Authentication Tokens

This is one of the most common reasons to use a JWT decoder.

It helps you confirm:

  • whether a token contains the expected claims
  • whether the wrong user data is present
  • whether expiration is causing login failures
  • whether an auth provider is issuing the right metadata

Your current page already lists debugging authentication tokens as a primary use case. (tech.kelsey-mcguire.com)

Inspecting API Bearer Tokens

APIs often use JWTs as bearer tokens.

A decoder helps when you want to:

  • inspect scopes
  • confirm identity claims
  • review issuer and audience values
  • troubleshoot authorization problems

Your current page already lists inspecting API bearer tokens as a core use case. (tech.kelsey-mcguire.com)

Checking Token Expiration and Claims

A token may look valid structurally but still fail because:

  • it is expired
  • it is not valid yet
  • the audience does not match
  • the issuer is wrong

Understanding JWT Structure

For developers learning authentication workflows, a decoder makes it much easier to see how a token is built and what information it carries.

Decoding vs Verifying

This is one of the most important distinctions to explain on the page.

Decoding

Decoding means:

  • splitting the token into parts
  • reading the header and payload
  • making the claims human-readable

Verifying

Verifying means:

  • checking the signature
  • confirming the token was signed by a trusted source
  • confirming the token has not been altered

A JWT decoder helps with readability, but decoding alone does not prove the token is valid, trusted, or safe to use.

That is a key educational point that adds real value to this page.

JWTs Are Not Encrypted by Default

A JWT is often misunderstood as secure just because it looks unreadable.

In many common JWT formats:

  • the header is encoded
  • the payload is encoded
  • the signature is attached

But the header and payload are often only encoded, not encrypted.

That means someone with the token can usually decode and read the visible claims.

Because of that, sensitive data should not be placed in JWT payloads unless you fully understand the security model and format being used.

Common JWT Mistakes

Assuming Decoding Means Validation

A token can decode successfully and still be:

  • expired
  • tampered with
  • signed by an untrusted source
  • intended for a different audience

Putting Sensitive Data in the Payload

JWT payloads are often readable after decoding, so confidential data should not be treated as hidden just because it is in a token.

Ignoring Expiration

A token may fail simply because the exp claim has passed.

Ignoring Audience or Issuer

A token may be real but still wrong for your application if the aud or iss values do not match what your system expects.

Confusing JWT With Session State

A JWT can carry identity-related data, but it does not automatically replace every part of secure session handling or authorization logic.

Common Developer and Admin Use Cases

API Troubleshooting

Use a decoder when an API rejects a bearer token and you need to inspect:

  • expiration
  • audience
  • scopes
  • identity claims

Identity Provider Debugging

When working with identity platforms, decoders help confirm what the provider is actually issuing.

Role and Permission Checks

A JWT often contains role or scope claims that affect authorization decisions.

Decoding helps confirm whether those values are present and correct.

Learning Auth Workflows

If you are learning how modern auth systems work, a JWT decoder is one of the easiest ways to make tokens less opaque.

Best Practices When Working With JWTs

When using JWTs, it helps to:

  • decode tokens only for inspection and debugging
  • verify signatures separately when trust matters
  • check exp, iat, nbf, iss, and aud
  • avoid placing sensitive secrets in payloads
  • treat bearer tokens carefully even if they are easy to decode
  • document expected claim structure in your application

For production systems, good token handling is about much more than just being able to decode the payload.

Frequently Asked Questions

What does JWT stand for?

JWT stands for JSON Web Token.

What does a JWT decoder show?

It shows the readable header and payload so you can inspect claims and token metadata.

Can a JWT decoder verify the token?

Not by itself. Decoding and verification are different steps.

Is a decoded JWT safe to trust?

No. A decoded token may still be expired, altered, or signed by an untrusted source.

Are JWT payloads encrypted?

Not by default in most common JWT usage. They are often encoded, not encrypted.

Why is my token failing even though it decodes?

Common reasons include:

  • expiration
  • wrong audience
  • wrong issuer
  • signature verification failure
  • token misuse in the application flow

Related Tools

You may also find these tools useful:

Final Note

This JWT Decoder is useful for inspecting token contents quickly during development, debugging, and authentication troubleshooting.

Use it to read the header and payload more clearly, but remember that decoding is only the first step. Real token trust depends on proper verification, correct claims, and secure handling throughout your application.