JustGenerator
Encoding 100% Client-Side Privacy

JWT Decoder & Inspector

Inspect Base64URL-encoded JWT headers, claims, and expiration timestamps right in your browser, with optional local HS256, HS384, and HS512 signature verification.

How a JWT splits into three segments

Every compact signed JSON Web Token (RFC 7519) consists of three Base64URL strings joined by two periods: header.payload.signature. Almost every JWT starts with eyJ because {" in Base64URL begins with those three characters. When you paste a token above, this tool splits on ., pads each Base64URL segment to a multiple of four characters, decodes UTF-8 bytes with TextDecoder, and pretty-prints both JSON objects.

Nothing leaves your browser tab. If you want to inspect the raw Base64URL encoding step by itself, you can paste either segment directly into our Base64 Encoder & Decoder.

Reading exp, iat, and nbf claims without doing Unix math

JWT timestamps use Unix seconds rather than JavaScript milliseconds. A common bug in custom token code is passing Date.now() (milliseconds, 13 digits) into exp instead of Math.floor(Date.now() / 1000) (seconds, 10 digits), creating tokens that stay valid until the year 58,000. Whenever a decoded payload contains exp, iat, or nbf, the status bar above the JSON panels converts each number into an ISO 8601 UTC date and flags whether the token is currently active or expired.

Checking HS256, HS384, and HS512 signatures locally

Decoding a token only shows what the sender claims. To confirm nobody edited the role or sub field in transit, paste your shared secret into the verification box at the bottom. For HS256, HS384, and HS512 tokens, this page computes the expected Web Crypto HMAC digest over header.payload, encodes it in unpadded Base64URL, and compares it against the third segment of your token.

One security pitfall to watch in backend libraries: always enforce an explicit allowlist of expected algorithms (for example, algorithms: ["RS256"]) when verifying tokens on your server. Reject tokens that declare "alg": "none", and never let an attacker downgrade an RS256 verifier to HS256 using your public key as an HMAC secret.

Need keys to sign new tokens? Generate a 256-bit HMAC secret with our Random Token Generator, test raw HMAC signatures with our HMAC-SHA256 & SHA-512 Generator, or create asymmetric signing keys with the RSA Key Pair Generator and Ed25519 Key Pair Generator.

Common questions

What is the difference between decoding a JWT and verifying a JWT?

Decoding only Base64URL-decodes the header and payload segments so you can read the JSON claims. Anyone can decode a JWT without a key. Verifying checks the cryptographic signature using your HMAC secret or asymmetric public key (RSA/Ed25519) to prove the token was issued by your server and has not been altered.

What are the three dot-separated parts of a JSON Web Token?

A compact JWS token has three Base64URL segments separated by periods: the Header (algorithm such as HS256 or RS256 and token type), the Payload (claims like sub, iss, aud, iat, and exp), and the Signature computed over header.payload.

Is it safe to store passwords or private personal data in a JWT payload?

No. Standard signed JWTs (JWS) are Base64URL-encoded, not encrypted. Anyone who intercepts the token in browser DevTools, proxy logs, or an email link can read every claim inside the payload. Never place passwords, SSNs, or private secrets inside an unencrypted JWT.

What do the exp, iat, and nbf timestamps mean in a JWT?

They are NumericDate values measured in Unix seconds (not milliseconds) since January 1, 1970 UTC. iat is when the token was issued, nbf is the earliest time it becomes valid, and exp is when the token expires and must be rejected.

Where should a web app store JWTs on the client side?

HttpOnly, Secure, SameSite cookies are safer than localStorage or sessionStorage because JavaScript cannot read HttpOnly cookies if an XSS vulnerability occurs. If your architecture requires Authorization: Bearer headers from a single-page app, keep access tokens short-lived (5 to 15 minutes) and rotate refresh tokens in HttpOnly cookies.

Is it safe to paste a real JWT into an online JWT decoder?

Only when the decoder runs strictly in your browser with zero network calls. This page decodes and verifies tokens locally via JavaScript and the Web Crypto API, never transmitting your token or secret to any server. Even so, avoid pasting live production admin tokens on shared machines.