>_
smartdevbox
Try SmartDevBox free — no sign-up91+ tools · 100% client-side · no account required
Glossary

What Is a JWT (JSON Web Token)?

A JWT is a compact, self-contained token that encodes a JSON payload and a cryptographic signature as three dot-separated Base64url strings. It lets a server verify claims — like user identity and permissions — without storing session state.

The One-Line Definition

A JSON Web Token (JWT) is a URL-safe string of the form header.payload.signature where each section is Base64url-encoded. It is defined in RFC 7519.

JWT Structure

Every JWT consists of exactly three sections, separated by dots:

eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9 .eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ .SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c

HeaderBase64url-encoded JSON specifying the token type and signing algorithm. {"alg":"HS256","typ":"JWT"}
PayloadBase64url-encoded JSON containing the claims — statements about an entity (typically the user) and additional metadata.
SignatureThe result of signing Base64url(header) + "." + Base64url(payload) with the algorithm declared in the header and a secret or private key.

Standard JWT Claims (Registered Claims)

RFC 7519 defines seven registered claim names. All are optional but widely used:

ClaimTypeMeaning
issstringIssuer — identifies who issued the token (e.g. your auth server URL)
substringSubject — the principal the token represents (typically a user ID)
audstring | string[]Audience — the intended recipient(s); servers should reject tokens with the wrong aud
expnumberExpiration time — Unix timestamp after which the token must be rejected
nbfnumberNot Before — Unix timestamp before which the token must be rejected
iatnumberIssued At — Unix timestamp when the token was created
jtistringJWT ID — unique identifier for this token, used to prevent replay attacks

Signing Algorithms

HS256 / HS384 / HS512Symmetric (HMAC). Same secret signs and verifies. Simple but the verifier can also issue tokens.
RS256 / RS384 / RS512Asymmetric (RSA). Private key signs, public key verifies. Verifier cannot forge tokens.
ES256 / ES384 / ES512Asymmetric (ECDSA). Smaller signatures than RSA. Preferred for mobile/IoT.
PS256 / PS384 / PS512Asymmetric (RSA-PSS). Probabilistic RSA variant; recommended over RS256 in newer systems.

The Payload Is Not Secret

The header and payload are only Base64url-encoded — not encrypted. Anyone who holds the token can decode and read the payload without the signing secret. Never include passwords, credit card numbers, or other sensitive data in a JWT payload unless you use a JWE (JSON Web Encryption) token instead.

JWT vs Session-Based Authentication

Session tokens (stateful)Server stores session state (database or in-memory). Client sends an opaque session ID. Simple to invalidate. Does not scale horizontally without a shared session store.
JWTs (stateless)All claims are in the token. Server only verifies the signature — no storage needed. Scales horizontally easily. Harder to revoke before expiry without a token blocklist.

Decode a JWT Now

Paste any JWT into SmartDevBox and the header and payload are decoded automatically — no tool selection, no secret required, no data sent to a server. Open the JWT Decoder → or JWT Encoder (sign tokens) →

Frequently Asked Questions

Can you decode a JWT without the secret?

Yes. The header and payload are Base64url-encoded, not encrypted. Anyone can decode and read them. The secret is only needed to verify that the token was issued by a trusted party.

What is the difference between JWT authentication and session-based authentication?

Session-based auth stores state on the server; JWTs are stateless — all claims are in the token. JWTs scale horizontally without shared storage but are harder to revoke before expiry.

What JWT signing algorithms should I use?

For new systems: ES256 (ECDSA P-256) or RS256 for asymmetric scenarios where verifiers should not be able to issue tokens. HS256 is fine for simple server-to-server use where the same party signs and verifies. Avoid the none algorithm — it disables signature verification.

How do I decode a JWT online for free?

Paste your JWT into SmartDevBox. It auto-detects the three-part JWT structure and shows the decoded header and payload as formatted JSON — no account, no secret needed, 100% client-side.

What Is Base64 Encoding?JWTs use Base64url — a URL-safe variant of Base64 — for their header and payload.
What Is a Unix Timestamp?JWT exp, iat, and nbf claims are all Unix timestamps.
JWT Decoder ToolAuto-detects JWT on paste, shows decoded header and payload instantly.
SmartDevBox vs jwt.ioSee how SmartDevBox compares to jwt.io for JWT debugging workflows.