Decoding JWT header and payload segments locally
A standard JSON Web Token consists of three dot-separated Base64URL segments representing a JOSE header, a JSON claims payload, and a cryptographic signature. Because Base64URL encodes bytes into URL-safe text rather than encrypting them, anyone holding a signed token can inspect its claims locally.
JOSE header metadata and Bearer prefix stripping
When you paste an Authorization header value, the decoder strips any leading Bearer prefix automatically and splits the token on . characters. Under the IETF RFC 7519 JSON Web Token Specification, the first segment must decode to a JSON object describing the signing algorithm (alg), token type (typ), and optional key identifier (kid).
Backend verification services use kid to look up the matching public key inside a JSON Web Key Set (JWKS). Both the Header and Payload cards render formatted 2-space JSON with one-click Copy buttons.
Below the Token box, a color-coded preview separates the bold header, underlined payload, and muted signature (or (empty signature) when missing). If a segment contains invalid Base64URL characters, unreadable bytes, or malformed JSON, an error alert identifies which part failed.
Base64URL decoding without sending tokens to a server
Base64URL replaces + and / with - and _ and omits trailing = padding so tokens travel cleanly inside HTTP headers and URLs. Decoding executes entirely inside your current browser tab without transmitting session credentials over the network.
If you want to inspect non-JSON binary payloads or decode standalone encoded strings outside a token envelope, check raw Base64URL string segments directly.
Reading time claims, expiry badges, and local dates
Token lifetime bugs are one of the most common causes of unexpected 401 Unauthorized responses in OAuth and OpenID Connect integrations. When a payload includes numeric timestamps, the Time claims card converts them into your browser’s local date and time with a relative countdown that refreshes every 15 seconds.
Evaluating exp, nbf, iat, auth_time, and updated_at
Alongside RFC 7519 claims (iat for Issued, nbf for Not valid before, and exp for Expires), the decoder recognizes auth_time (Authenticated) and updated_at (Updated) from the OpenID Connect Core 1.0 Specification.
Status badges summarize validity immediately: Expired appears when exp is in the past, Not active yet appears when nbf is still in the future, and Not expired confirms the token is currently within its window.
Why Unix seconds differ from JavaScript milliseconds
RFC 7519 defines NumericDate values as seconds since 1970-01-01T00:00:00Z, so this decoder multiplies each claim by 1,000 before formatting local dates. If an issuer accidentally writes millisecond timestamps, expiration dates jump centuries ahead.
You can convert Unix epoch seconds across time zones whenever you need to compare raw exp values against server logs. Because the Time claims card refreshes its relative labels every 15 seconds while a token is displayed, you can watch short-lived OAuth tokens expire live during local API testing.
How do signed JWS tokens differ from encrypted JWE tokens?
Signed JWS tokens use three dot-separated segments with readable Base64URL JSON claims, whereas encrypted JWE tokens use five segments containing ciphertext that cannot be read without the decryption key. Pasting a five-part token triggers an immediate error explaining why encrypted payloads stay opaque.
| Token property | Signed JWS (RFC 7515) | Encrypted JWE (RFC 7516) |
|---|---|---|
| Dot-separated segments | 3 (header.payload.signature) |
5 (header.key.iv.ciphertext.tag) |
| Payload visibility | Readable Base64URL UTF-8 JSON | Encrypted ciphertext (opaque without key) |
| Integrity protection | Digital signature or HMAC | Authenticated encryption tag |
| Browser inspection | Decodes Header and Payload locally | Rejected with 5-part JWE notice |
| Primary use case | Stateless API auth and OIDC ID tokens | Confidential claims across untrusted hops |
As specified in the IETF RFC 7516 JSON Web Encryption Standard, five-part compact serialization protects claim confidentiality end-to-end. For complex three-part payloads you want to sort or inspect as a collapsible tree, copy the payload into the JSON formatter.
Security warnings: unsigned tokens and 64-bit integer rounding
Reading claims in the browser is only the first step; decoding never verifies cryptographic signatures. Always treat decoded claims as untrusted until your backend validates the signature against a trusted secret or public key.
Rejecting alg: none and empty-signature tokens
Under the IETF RFC 7515 JSON Web Signature Specification, "alg": "none" denotes an unsecured JWS with an empty signature. When either header.alg equals none or the third segment is empty, this tool displays an unsigned-token warning banner.
Production APIs must pin allowed algorithms (such as RS256 or ES256) on the server so attackers cannot strip signatures and forge admin roles. For replay protection with jti claims, generate unique jti token identifiers on issuance.
Avoiding 53-bit precision loss on numeric IDs
Standard JavaScript JSON.parse() converts numbers into IEEE 754 double-precision floats, which round integers exceeding 53 bits (9,007,199,254,740,991). If a payload contains unquoted 16+ digit integers, an automatic warning banner alerts you to potential rounding.
The scanner inspects raw payload JSON outside quoted strings before parsing, catching unsafe sub, user_id, or tenant_id numbers even when nested inside custom claims. Non-finite or out-of-range timestamps beyond JavaScript’s 8.64e15 millisecond Date limit are also skipped safely without crashing the Time claims card.
Tip: Serialize 64-bit user IDs, tenant IDs, and Snowflake identifiers as quoted JSON strings (such as
"sub": "9007199254740993") so client decoders never alter trailing digits.