JWT Decoder

Paste a token and inspect header and payload as JSON. Signature is not verified here.

{{ jwt.message }}

Overview

JWT arrived as a response to a real problem that the growth of SPAs and microservices created in the early 2010s. Before it, the standard authentication model on the web was based on server-side sessions: the server keeps a record of who is logged in in memory, a database, or Redis, and the browser receives a cookie with the session ID. This works well on a single server, but in distributed architectures with multiple instances you need shared sessions, sticky sessions, or a centralized cache. Mike Jones, John Bradley, and Nat Sakimura formalized JWT in RFC 7519 in 2015, but the concept had been circulating since 2010 in the context of OAuth 2.0 — the authorization protocol that Google, Facebook, and Twitter used to allow login on third-party sites.

A JWT's structure consists of three dot-separated parts, each Base64URL-encoded: header, payload, and signature. The header declares the algorithm — HS256 uses HMAC with SHA-256 and a shared symmetric key; RS256 uses RSA with SHA-256 and an asymmetric key pair. The payload carries standard claims: sub for the user ID, exp for the expiration timestamp, iat for the issued-at time, and iss for the issuer. The signature ensures the token was not tampered with, but does not encrypt the payload — anyone can decode a JWT payload from Base64, they simply cannot create a valid token without the key. A historically notable vulnerability: some libraries accepted tokens with the algorithm declared as none, skipping signature verification entirely.

The debate around using JWT for web application authentication is richer than it appears. The main advantage is the stateless nature: the server does not need to query a database on every request, genuinely useful in microservices where dozens of services need to verify authentication. The central problem is that you cannot invalidate a token before it expires — if a user logs out or is compromised, the token remains valid until exp. The usual solution, a revoked token blacklist in Redis, reconstructs exactly the centralized state you were trying to avoid. For traditional web applications with a single server, opaque tokens with server-side sessions are usually the simpler and safer choice. JWT shines in OAuth and OIDC for federated login and in short-lived tokens between microservices.

Technical deep dive

Common questions summarized

  • What is this tool for?: It runs fully in your browser: useful to validate, format, or convert data in everyday development.
  • Are my inputs sent to a server?: Processing happens locally with JavaScript. We do not store what you paste into the text areas.
  • Can I use this for real production data?: Use at your own risk. For secrets (passwords, tokens), prefer controlled environments and your company policies. And always review the generated contents. Never trust blindly things you see on the internet.

Sample payload to try

  • See also the larger "Code Snippets" sample; paste this excerpt to try locally: Structure — header.payload.signature (Base64URL)

Tool guide

  • What a JWT is JSON Web Token: three Base64URL parts (header, payload, signature), used in stateless auth. The payload holds claims (sub, exp, etc.), often only Base64, not encrypted.

  • What the tool does Decodes header and payload to readable JSON. It does not verify the signature or trust the issuer.

  • Why use it Debug expiry (exp), scopes, and claims in development. Never paste production tokens into untrusted sites.

Code Snippets

Code example
header.payload.signature (Base64URL)

Structure

header.payload.signature (Base64URL)

FAQ

What is this tool for?

It runs fully in your browser: useful to validate, format, or convert data in everyday development.

Are my inputs sent to a server?

Processing happens locally with JavaScript. We do not store what you paste into the text areas.

Can I use this for real production data?

Use at your own risk. For secrets (passwords, tokens), prefer controlled environments and your company policies. And always review the generated contents. Never trust blindly things you see on the internet.