Published: May 18, 2026
JSON Web Tokens (JWT) have become the standard for modern web authentication. If you've ever logged into a single-page app, used a REST API, or implemented OAuth 2.0, you've likely encountered JWTs. This beginner-friendly guide explains what JWTs are, how they work, and how to decode and inspect them using a free JWT decoder.
A JSON Web Token (pronounced "jot") is a compact, URL-safe token format for transmitting claims between parties. It's defined by the open standard RFC 7519. JWTs are digitally signed, so the receiving party can verify the sender's identity and ensure the content hasn't been tampered with.
A JWT looks like three base64-encoded strings separated by dots:
eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
The three parts are the header, payload, and signature.
The header contains metadata about the token: the signing algorithm (typically HS256 for HMAC-SHA256 or RS256 for RSA-SHA256) and the token type (JWT). Decoded, it looks like:
{
"alg": "HS256",
"typ": "JWT"
}
The payload contains the claims — statements about the user and additional metadata. There are three types of claims:
iss (issuer), sub (subject), aud (audience), exp (expiration time), iat (issued at), and nbf (not before)name, email, or role{
"sub": "1234567890",
"name": "John Doe",
"iat": 1516239022,
"exp": 1516242622,
"role": "admin"
}
The signature is created by taking the encoded header and payload, concatenating them with a dot, and signing the result with a secret key (HMAC) or a private key (RSA/ECDSA). The signature ensures the token hasn't been altered. Without the secret key, an attacker cannot forge a valid signature.
The typical JWT authentication flow works like this:
Authorization: Bearer <token> headerUsing a JWT decoder lets you inspect the contents of any JWT token instantly. Paste your JWT into the decoder and it will display:
Our JWT decoder runs entirely in your browser — tokens are never sent to any server, keeping your user data safe.
exp, nbf, iss, and aud on every requestJWTs are excellent for API authentication, mobile apps, single-page applications, and microservice architectures. Traditional session-based authentication (with server-side session storage) may be simpler for server-rendered web apps that don't need cross-domain capabilities. Consider your specific needs — many modern applications use a combination of both.
Try our free JWT decoder to inspect your tokens. Also check out the Base64 encoder/decoder and JSON formatter for working with the individual parts of a JWT.