Skip to content

JWT decoder

Paste a token to read its header, payload and dates.

Decoding only reads Base64URL claims. It never checks the cryptographic signature, so always verify tokens on your server.

Your files are open only in this tab. Nothing is uploaded.

Paste a JSON Web Token to inspect its header, payload and expiry claims.

How to use JWT decoder

  1. Paste your token string. Paste a compact three-part JWT (with or without a Bearer prefix) into the Token box, or select Try an example.
  2. Review the segmented token preview. Check the color-coded Header, Payload, and Signature segments below the input box.
  3. Inspect Time claims and status badges. Verify local timestamps and live countdowns for Issued, Not valid before, Expires, Authenticated, and Updated.
  4. Copy formatted Header or Payload JSON. Select Copy on either card to place the 2-space indented JSON on your clipboard.

Everything runs in this browser tab. Nothing you paste or open is uploaded or logged, so it's safe for keys, tokens and private data.

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.

Questions

How do I decode a JWT without verifying the signature?

Paste the three-part token into the Token box to read its Header and Payload JSON immediately without a signing key. Standard JWS tokens use Base64URL encoding for transport rather than encryption, so anyone holding the token can inspect claims.

What is the difference between JWS and JWE tokens?

A JSON Web Signature (JWS) has three dot-separated segments with readable Base64URL JSON claims. A JSON Web Encryption (JWE) token has five segments containing encrypted ciphertext that cannot be decoded without the private decryption key or shared secret.

Why does the exp claim use Unix seconds instead of milliseconds?

IETF RFC 7519 defines NumericDate claims as seconds elapsed since the Unix epoch. Passing JavaScript millisecond timestamps from Date.now() multiplies lifetimes by 1,000, pushing expiration dates decades into the future.

Is it safe to decode production Bearer tokens in the browser?

Here, yes, because decoding runs locally in memory with zero network calls or server logs. Many server-backed web decoders transmit pasted tokens to remote endpoints, which risks exposing active session credentials.

What causes the alg none vulnerability in JWT?

The alg none flaw occurs when a backend server reads the token header and accepts unsigned tokens marked with alg set to none. Always enforce an explicit algorithm allowlist on your server and reject unsigned tokens.

Why does my token show a 64-bit integer precision warning?

JavaScript Number values rely on 64-bit floats that round integers larger than 53 bits (9,007,199,254,740,991). Store 64-bit database IDs or Snowflake identifiers as quoted JSON strings inside JWT claims.

Updated