JWTDecoder

Decode JWT tokens securely in the browser to inspect headers, payloads, and claims.

Quick Answer
Read Full Explanation
A JWT Decoder splits the token into three parts and decodes the header and payload to reveal the JSON claims.

Short Answer

A JSON Web Token (JWT) is an open standard (RFC 7519) for securely transmitting data. A JWT decoder parses the token into human-readable JSON so you can read the token's claims (issuer, expiration, user info), but it doesn't verify the signature.

Detailed Explanation
A JWT is a compact, URL-safe token format that holds a JSON payload of claims. An online JWT decoder takes a token (format header.payload.signature), Base64URL-decodes the header and payload, and displays the contained JSON data. Signature verification is a separate process. This lets you view claims like iss and exp in plain text.
Comprehensive Overview
A JSON Web Token (JWT) consists of three Base64URL-encoded parts. The header specifies metadata (algorithm, token type) and the payload carries claims. Using a JWT Decoder, you split the token at each dot and Base64URL-decode the first two parts into JSON. Decoding does not verify the signature or secret; it only displays the data. Our decoder operates entirely client-side, showing the content for inspection without transmitting the token over the network.
Client-Side Decoding Header Parsing Payload View Free Tool

Encoded Token

Paste your Base64 encoded token string below.

Decoding happens entirely in your browser

Awaiting JWT Input

Paste a token on the left to analyze its contents.

jwt decode jwt verify JSON Web Token format online JWT tool decode jwt payload inspect jwt claims RFC7519
Token SeparatorDot (.)
EncodingBase64URL
PartsHeader, Payload, Sig
FormatJSON
StateStateless
StandardizedRFC 7519

What Is a JSON Web Token (JWT)?

Definition

A JWT (JSON Web Token) is a self-contained, URL-safe token format defined by RFC 7519 that securely transmits JSON claims between parties. The information is digitally signed, ensuring data integrity.

Why Developers Use It

Because they are self-contained, JWTs hold necessary user information without requiring a backend database query on every request. This stateless nature makes them ideal for scalable APIs and Single Sign-On (SSO).

Header
eyJhbGciOiJIUzI1...
.
Payload (Claims)
eyJzdWIiOiIxMjM0...
.
Signature
SflKxwRJSMeKKF2Q...

Key Facts

  • Standardized via RFC 7519
  • Base64URL encoded, not encrypted
  • Stateless and self-contained
  • Signed for integrity validation

How To Decode a JWT

  1. Split the token: JWTs are in the form header.payload.signature, separated by periods.
  2. Base64-URL decode: Decode the first (header) and second (payload) parts from Base64URL to UTF-8 text.
  3. Parse JSON: Convert the decoded strings into JSON objects to view the header fields and payload claims.
  4. (Optional) Verify signature: Use the appropriate secret or public key to check the signature for validity. Without the key, decoding alone only reveals non-sensitive data.

JWT Decode vs JWT Verify

ActionJWT DecodeJWT Verify
PurposeView header and payload contentsCheck token signature authenticity
Secret/Key NeededNo (just Base64URL decode)Yes (shared secret or public key required)
OutputJSON header and claimsBoolean result (valid/invalid) plus claims
Typical UseDebugging, inspecting token contents on clientAuthenticating token before use on backend

JWT vs Session Cookie

JWT (Token)

Stateless Auth
Scalable across microservices
Cannot be easily invalidated before expiration

Session Cookie

Stateful Auth
Easy to invalidate instantly on server
Requires server memory/DB lookup

Common Mistakes & Misconceptions

Storing PII in Payload
Reason: JWTs are only signed, not encrypted (unless using JWE). Anyone can decode them.
Solution: Do not put passwords or sensitive PII in the payload.
Assuming Decoding is Secure
Reason: Decoding a JWT client-side does not prove it wasn't tampered with.
Solution: Always verify the signature on your backend.
No Expiration (exp)
Reason: Without an exp claim, a stolen token can be used indefinitely.
Solution: Always include a short-lived exp claim.
Accepting 'alg: none'
Reason: A malicious user can set the algorithm to 'none' to bypass signature checks.
Solution: Strictly enforce accepted algorithms (e.g. HS256) in your library.

Developer Code Examples

// Node.js using jsonwebtoken
const jwt = require('jsonwebtoken');

// Verify and decode
try {
  const decoded = jwt.verify(token, 'your-secret-key');
  console.log(decoded);
} catch(err) {
  console.error("Invalid signature or expired", err);
}

Security Best Practices

Use strong signing keys
Verify signature strictly
Always enforce HTTPS
Use short token lifetimes
Don't store sensitive PII
Validate the algorithm

Browser & Tech Support

Chrome
Firefox
Safari
Edge
Node.js
Python
Java
C#

Troubleshooting

Problem: Invalid signature error
Cause: Secret key is incorrect or token was tampered with.
Solution: Ensure you use the correct secret/key. Decoding alone does not fix this.
Problem: jwt.decode returns null
Cause: The string is malformed or not a valid Base64URL string.
Solution: Check that the token has exactly two periods (header.payload.signature).
Problem: Token expired handling
Cause: The 'exp' claim is in the past.
Solution: Your application should catch the ExpiredSignatureError and request a new token.
Problem: Empty payload
Cause: The token has an empty payload section (two consecutive periods).
Solution: The issuer generated a token with no claims.

JWT Claims Glossary

exp (Expiration Time)

Identifies the exact time on or after which the JWT MUST NOT be accepted.

iss (Issuer)

Identifies the principal that issued the JWT (e.g., auth.example.com).

sub (Subject)

Identifies the principal that is the subject of the JWT (e.g., the User ID).

aud (Audience)

Identifies the recipients that the JWT is intended for.

nbf (Not Before)

Identifies the time before which the JWT MUST NOT be accepted for processing.

iat (Issued At)

Identifies the time at which the JWT was issued.

Frequently Asked Questions

General

What exactly is a JSON Web Token (JWT)?

A JSON Web Token (JWT) is an open standard (RFC 7519) that defines a compact and self-contained way for securely transmitting information between parties as a JSON object. This information can be verified and trusted because it is digitally signed.

What does JWT stand for?

JWT stands for JSON Web Token. It is commonly used for stateless authorization and secure information exchange in modern web applications and APIs.

Is JWT an official standard?

Yes, JWT is defined by the Internet Engineering Task Force (IETF) in RFC 7519. It is widely adopted across the industry.

Decoding & Security

How do I decode a JWT token?

To decode a JWT, first split the token string at the periods to isolate the header, payload, and signature. Then, Base64URL-decode the header and payload. You can use our JWT Decoder tool to do this instantly in your browser.

Does decoding a JWT verify its authenticity?

No. Decoding a JWT simply translates the Base64Url string into readable JSON. It does not verify the signature. To verify authenticity and trust the token, you must check its signature against the appropriate secret or public key.

Can I decode a JWT without the secret?

Yes, you can decode the header and payload of a standard JWT without the secret because they are merely Base64URL encoded, not encrypted. However, you cannot verify the signature without the secret.

Is it safe to paste my JWT into an online decoder?

Yes, if the tool processes the token client-side. Our JWT Decoder performs all decoding directly in your browser using JavaScript. The token is never sent to our servers, ensuring your data remains private.

Are JWTs encrypted by default?

No, standard JWTs (JWS) are only signed, not encrypted. Anyone who intercepts the token can decode and read the payload. You should never put sensitive data (like passwords or PII) in a standard JWT.

Developer Q&A

Why does jwt.decode return null or throw an error?

If decoding fails, the token might be malformed (e.g., missing periods, invalid Base64 padding), or it might not be a JWT at all. Ensure the string format is exactly header.payload.signature.

What is the difference between JWT decode and JWT verify?

JWT Decode translates the token's payload to readable JSON so you can inspect it (requires no key). JWT Verify recalculates the signature to mathematically ensure the token was issued by a trusted party and hasn't been tampered with (requires a secret/public key).

What does the 'exp' claim mean?

The 'exp' (expiration) claim identifies the exact time (as a UNIX timestamp) on or after which the JWT MUST NOT be accepted for processing.

Which JWT algorithms are most common?

HS256 (HMAC with SHA-256) is common for symmetric signing (shared secret), and RS256 (RSA Signature with SHA-256) is widely used for asymmetric signing (public/private key pairs).

References

RFC 7519 (JWT) OWASP JWT Cheat Sheet IETF Standards MDN Web Docs