What Is a JWT? A Plain-English Guide to JSON Web Tokens

If you've ever logged into a website and stayed logged in as you clicked around, there's a good chance a JWT was quietly doing the work behind the scenes. Here's what they actually are, without the usual jargon-heavy explanation.

The problem JWTs solve

Websites need a way to remember that you're logged in as you move between pages, without asking for your password on every single click. A JWT (JSON Web Token, pronounced "jot") is a compact, self-contained way for a server to hand your browser a "proof of login" that can be checked quickly on every subsequent request, without the server needing to look anything up in a database each time.

The three parts of a JWT

A JWT is three sections separated by periods: a header, a payload, and a signature.

  • Header: Describes the token type and which signing algorithm was used.
  • Payload: The actual data (called "claims") — commonly a user ID, when the token was issued, and when it expires.
  • Signature: A cryptographic signature proving the token hasn't been tampered with since the server issued it.

The part that surprises people: it's not encrypted

The header and payload are encoded (using Base64URL), not encrypted — meaning anyone who has the token can decode and read exactly what's inside it, including you. This is normal and by design. The signature is what actually secures the token, by proving it came from the real server and wasn't altered — not by hiding its contents.

Why this means sensitive data shouldn't live in a JWT payload

Since anyone can decode a token's payload, storing something like a password, a full credit card number, or other sensitive personal data directly inside it would expose that data to anyone who ever gets hold of the token — which is exactly why well-designed systems keep JWT payloads limited to non-sensitive identifiers like a user ID, not sensitive data itself.

Decoding vs. verifying: an important distinction

Anyone can decode a JWT and read its contents with basic tools, since that just requires reversing the Base64URL encoding. Verifying that a JWT is authentic and unaltered is a completely different operation — it requires the secret key (or public key, depending on the algorithm) that only the issuing server holds. A tool that decodes a JWT for you to inspect is not the same as one that can confirm it's genuinely valid.

Our free JWT Decoder decodes a token's header and payload instantly so you can inspect what's inside — entirely in your browser, with a clear note that decoding isn't the same as verifying authenticity.