JWT Decoder

Decode JWT tokens online —
free & 100% private

Paste any JSON Web Token and instantly inspect its header, payload claims, and expiry status. Your token never leaves your browser.

Open JWT Decoder

Everything inside a JWT, at a glance

Header — algorithm & type See the signing algorithm (HS256, RS256, etc.) and token type decoded from the first segment.
Payload — all claims Pretty-printed JSON of every claim: sub, iss, aud, custom claims, and more.
Expiry status The decoder reads exp and iat and tells you instantly whether the token is valid or expired.
Base64url padding fix Handles tokens with or without padding — common pitfall in JWT libraries, solved automatically.

Your token stays in your browser

100% client-side decoding

JWT decoding is pure base64url — no server is needed and none is used. The tool runs entirely in JavaScript in your browser tab. There is no network request for your token, no logging, and no storage. Safe to use with production tokens.

No account. No upload. No nonsense.

🔒

No Server

There is no backend. Your token cannot be intercepted because it never travels over the network.

Zero Dependencies

Single self-contained HTML file. No libraries, no CDN calls, no supply-chain risk.

📡

Works Offline

Load once and use forever — decode tokens even without an internet connection.

Related JSON tools

JSON Formatter Pretty-print JSON with syntax highlighting and a collapsible tree view.
JSON Validator Validate JSON against RFC 8259 with precise error locations.
JSON Repair Automatically fix broken JSON with trailing commas, unquoted keys, and more.
JSON to TypeScript Generate typed TypeScript interfaces from your JSON structure instantly.

Common questions answered

Is the JWT decoder free?

Yes, completely free with no signup.

Does JWT decoding send my token to a server?

No. JWT decoding is 100% client-side — your token never leaves your browser.

Does the JWT decoder verify the signature?

No. The tool decodes the header and payload for inspection. Signature verification requires the secret key, which is not needed to read the claims.

Can I see if a JWT is expired?

Yes. The decoder shows the exp claim as a human-readable date and flags whether the token has expired.

What JWT algorithms are supported for decoding?

Decoding works for any algorithm (HS256, RS256, ES256, etc.) since it only reads the base64url-encoded header and payload.

What is a JWT (JSON Web Token)?

A JSON Web Token (JWT) is a compact, URL-safe token format for authentication and authorization. A JWT has three Base64URL-encoded parts separated by dots: a header (algorithm), a payload (claims like user ID, roles, expiration), and a signature (integrity verification). JWTs are the standard for stateless authentication in REST APIs and single-page applications.

This decoder splits a JWT into its three parts and displays each as formatted JSON. The header shows the signing algorithm (HS256, RS256), the payload reveals all claims with human-readable timestamps, and the signature section shows the raw data. Decoding happens entirely in your browser — critical since JWTs contain sensitive user data and permissions.

Decode a JWT token
Input
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.
eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6
IkFsaWNlIiwiaWF0IjoxNjk3MDAwMDAwfQ.
SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
Output
Header: {"alg":"HS256","typ":"JWT"}

Payload:
{
  "sub": "1234567890",
  "name": "Alice",
  "iat": 1697000000
  // Oct 11, 2023 04:53 UTC
}

Get the most out of this tool

Ready to decode a JWT?

Free forever. No signup. Your token stays private.

Decode JWT now

Understanding JSON Web Tokens

A JSON Web Token (JWT) is a compact, URL-safe means of representing claims between two parties. Defined in RFC 7519, JWTs are the most widely used token format for stateless authentication on the web. When a user logs in, the server generates a JWT, signs it with a secret or private key, and sends it to the client. The client stores it (typically in memory or localStorage) and attaches it to subsequent requests in the Authorization header as a Bearer token.

A JWT consists of exactly three Base64url-encoded parts separated by dots: the header, the payload, and the signature. The header identifies the token type and the signing algorithm — most commonly HS256 (HMAC-SHA256) for symmetric keys or RS256 (RSA-SHA256) for asymmetric key pairs. The payload contains the claims: statements about the user and any additional metadata the application needs.

The payload carries standard claims defined by the RFC. The sub (subject) claim identifies who the token is about — usually a user ID. The iss (issuer) claim identifies which service issued the token. The aud (audience) claim restricts which services should accept the token. The exp (expiration time) claim defines when the token expires as a Unix timestamp. The iat (issued at) claim records when the token was created. The nbf (not before) claim prevents the token from being used before a specific time.

The third part — the signature — is what makes JWTs trustworthy. For HS256, the server concatenates the encoded header and payload with a dot, then computes an HMAC using a secret key known only to the server. Anyone who receives the JWT can decode the header and payload and read the claims, but only the server that holds the secret can verify that the signature is valid. This is why JWTs are called "signed" tokens — the signature guarantees integrity, not confidentiality.

Because the payload is only Base64url-encoded (not encrypted), JWTs should not contain sensitive personal information unless the entire token is additionally encrypted using JWE (JSON Web Encryption). Storing passwords, credit card numbers, or government IDs in JWT payloads is a serious security mistake. Treat the payload as public — anyone who intercepts the token can read it.

Algorithm confusion attacks are a known JWT vulnerability class. An attacker might modify the header to change the algorithm from RS256 (asymmetric) to HS256 (symmetric), then sign the token using the server's public key as the HMAC secret. A vulnerable server using the algorithm specified in the token header instead of the expected algorithm would accept this forged token. Always verify that the algorithm in the decoded header matches what your server expects, not whatever the token claims.

Token expiration is the first thing to check when debugging authentication failures. The exp claim is a Unix timestamp (seconds since January 1, 1970). This decoder displays it as both the raw timestamp and a human-readable date so you can instantly see whether the token has expired. Clock skew between the issuing server and the validating server can cause tokens to be rejected slightly before their displayed expiration — allowing a small leeway (typically 30–60 seconds) in your validation logic is standard practice.

When developers use this tool

Debugging authentication failures When a request returns 401 Unauthorized, decode the JWT from the Authorization header to check if the token has expired, was issued for the wrong audience, or is missing required claims.
Inspecting third-party tokens When integrating with an identity provider like Auth0, Cognito, or Okta, decode their tokens to understand what claims are included and how to access user information in your application.
Verifying algorithm and key type Check the header of a JWT to confirm it uses the expected signing algorithm. Catching an unexpected "none" algorithm or a downgraded HS256 where RS256 is expected can reveal a security misconfiguration.
Testing and development During development, paste tokens from Postman, curl, or browser DevTools to verify your token generation code produces correct claims before deploying to a test environment.

Common JWT security mistakes to avoid

Additional frequently asked questions

Can this tool verify a JWT signature?

No. Signature verification requires the secret key or public key used by the issuing server, which is never available in a browser decoder. This tool decodes the header and payload — which is everything you need for debugging — but signature verification must happen on your server.

What does Base64url encoding mean for JWTs?

Base64url is a variant of Base64 that replaces + with - and / with _, and omits padding characters. This makes the encoded string safe to use in URLs and HTTP headers without percent-encoding. JWTs use Base64url for all three parts — header, payload, and signature.

What is the difference between HS256 and RS256?

HS256 uses a shared secret key for both signing and verification — both parties must know the secret. RS256 uses an RSA private key to sign and a public key to verify, enabling third parties to verify tokens without access to the signing key. RS256 is preferred for multi-service architectures.

Why does my token show three dots but only decode two parts?

A valid JWT always has exactly three parts separated by two dots. If you see fewer or more, the token may be truncated, corrupted, or not a JWT at all. Opaque tokens from OAuth flows look similar but cannot be decoded — they are references, not self-contained claims.

How long should a JWT access token be valid?

Best practice is 15 minutes to 1 hour for access tokens, paired with a longer-lived refresh token (days to weeks). Short-lived tokens limit the window of compromise. If you cannot revoke tokens server-side, shorter lifetimes are your primary security control.