JWT Decoder Online — Inspect Claims and Expiry Safely

Decode JWT headers and payloads; inspect signature segments and expiry dates instantly. Review claims locally in your browser with clear warnings.

100% Client-Side • Your data stays in your browser
How to use & FAQ
Loading tool...

JWT Decoder

A JSON Web Token can carry identity details, application roles, an intended audience, and a limited time window in a compact string. When a sign-in request fails or a service rejects an access token, reading those fields is often the quickest way to locate the mismatch. This JWT decoder separates a pasted token into its header, payload, and signature, formats the two JSON sections, and highlights registered claims and timestamps. You can paste a raw token or an Authorization value that starts with Bearer. The decoded result stays in your browser; this page does not send the token to a decoding service. Reading a JWT is different from trusting one. Anyone can construct readable header and payload text. This tool does not check cryptographic signatures, keys, issuers, or audiences, so an attractive “active” time badge is only a calculation from the visible claims. Use your application's real validation code to decide whether a token grants access.

How to Use This Tool

  1. 01 Paste the complete compact JWT into the input area. A copied Bearer prefix, surrounding quotation marks, a byte order mark, outer spaces, and wrapped line breaks are identified and removed with a visible cleanup note.
  2. 02 If you do not have a token at hand, choose Load sample. Its UTF-8 name, audience list, roles, and standard time claims show the layout; its illustrative signature is not valid authentication material.
  3. 03 Read the formatted header for the advertised algorithm and token type. Then read the payload for the issuer, subject, audience, expiration, start time, issue time, token ID, and any application-specific fields.
  4. 04 Compare the time status with the separate UTC, browser-local, and relative displays. The calculation uses Unix seconds and your current browser clock; it does not prove that a server accepts the token.
  5. 05 Use the Copy action in each section header for just that section, or Copy report and Download JSON above the result for a combined record. Handle copied tokens as carefully as other credentials.

How It Works

A common signed JWT uses three period-separated parts: a Base64URL-encoded JSON header, a Base64URL-encoded JSON payload, and a signature. Base64URL uses the URL-safe characters hyphen and underscore instead of plus and slash. Decoding those first two parts reveals text encoded as UTF-8, so names with accents and non-Latin characters must survive byte decoding before JSON parsing. The signature is shown as its original encoded segment because cryptographic signatures are usually binary, not readable text. This page does not calculate or verify a signature. The parser checks the raw length before doing work, validates segment count and Base64URL syntax, rejects invalid UTF-8, and reports whether the header or payload contains malformed JSON or a non-object value. It reports a five-part token as a likely encrypted JWE, which cannot be read by this three-part decoder. For time claims, exp is the expiration boundary, nbf is the earliest valid moment, and iat records issuance. JWT NumericDate values are seconds since the Unix epoch. The displayed time status compares exp and nbf with the current browser time; an apparent millisecond value or an unusable timestamp is flagged instead of being treated as a reliable date. The iat field is shown for context and does not by itself start or end validity.

Practical Examples

Checking a rejected access token

Input
                      Header: {"alg":"RS256","typ":"JWT"}; payload: {"sub":"user-123","exp":1735689600}
                    
Output
                      Expired when the browser clock passes 2025-01-01 00:00:00 UTC.
                    

A developer can spot an old exp immediately, then investigate token renewal. The header merely advertises RS256; this decoder cannot confirm that an RS256 signature was produced by a trusted key.

Finding an audience mismatch

Input
                      Payload: {"iss":"https://example.com","aud":["web-app","mobile-app"],"sub":"user-123"}
                    
Output
                      Registered claims table lists issuer, audience array, and subject separately.
                    

An API expecting a different audience may reject the token even when its time window is active. Compare aud with the audience configured by the receiving service.

Spotting milliseconds in a time claim

Input
                      Payload: {"iat":1735689600000,"exp":1893456000000}
                    
Output
                      Millisecond warning and invalid time status.
                    

JavaScript Date.now() returns milliseconds, but JWT NumericDate expects seconds. Divide by 1,000 in the producer if those values were entered accidentally, then issue a new token.

Tips & Best Practices

  • Check the issuer and audience together with the time claims. A current expiration does not make a token suitable for every API or every user.
  • Treat a two-part token or a three-part token with an empty signature as unsigned. It may be useful for debugging, but a protected service should validate the format and signature according to its own policy.
  • Use UTC when comparing dates with server logs. Your local clock display is convenient for people, while UTC avoids confusion across time zones and daylight-saving changes.
  • If a pasted token has five parts, it is probably a JWE. A JWE encrypts content and needs the appropriate decryption key and library; Base64URL parsing alone will not reveal its claims.
  • If JSON parsing fails, inspect the named segment and reported line and column. A missing quote, comma, or brace in the original JSON can break a token even if its Base64URL encoding looks normal.
  • Avoid posting real access tokens in issue trackers or chat. Local decoding reduces exposure to a remote decoder, but copies, screenshots, browser extensions, and downloaded reports can still disclose credentials.

Frequently Asked Questions

Does decoding a JWT verify its signature?

No. Decoding only reads Base64URL and JSON. A valid-looking payload may have been edited or invented. Verification requires the correct algorithm, trusted key, and application checks for issuer, audience, time, and any other policy before accepting the token.

Is my token uploaded to a server?

No. Parsing, formatting, time calculation, and copy preparation run inside your browser. The page does not submit your token to a decoding endpoint. Keep the resulting text private when you copy, download, or share it.

What do exp, nbf, and iat mean?

exp is the expiration boundary, nbf means not before, and iat is issued at. Their values are Unix seconds, including possible fractional seconds. The status compares exp and nbf with your current browser clock; iat is displayed as context.

Why does a token show active but my API still rejects it?

The badge only describes the visible time window. The server may reject a bad signature, untrusted issuer, wrong audience, revoked token, unsupported algorithm, missing permissions, or clock skew. Check the server validation response and configuration.

Why does my pasted token have five segments?

Five compact segments usually indicate a JSON Web Encryption token, or JWE. Its payload is encrypted rather than directly readable. This decoder is intended for signed JWTs with three segments; decryption requires appropriate keys and a JWE-aware library.

What if the expiration value appears to be in milliseconds?

JWT NumericDate uses seconds, while some programming APIs produce milliseconds. The decoder flags very large time values and avoids presenting a misleading date. Verify the producer and generate a corrected token instead of editing a signed token by hand.

Related Tools