JWT Decoder

Inspect the header and payload of a JSON Web Token, read the claims and check the expiry. The signature is not verified.

Paste the token only. Remove a leading Bearer and any surrounding quotes first.

Decoded token

Both parts are base64url text that decodes to JSON. The signature is left untouched.

—

Common signature algorithms

alg value Family Key used to verify Shared secret
HS256HMAC with SHA-256The same secret used to signYes
RS256RSA PKCS#1 v1.5 with SHA-256The signer's public keyNo
PS256RSA-PSS with SHA-256The signer's public keyNo
ES256ECDSA with P-256 and SHA-256The signer's public keyNo
EdDSAEd25519The signer's public keyNo
noneNo signatureNothingNo

Rate this Tool

0.0/5

Based on 0 user ratings.

A JWT is three base64url strings joined by dots

The compact form is easy to pass in an HTTP header, but it is also easy to misread: readable does not mean trusted.

The three parts of a JSON Web Token

A signed token in JWS compact serialization has three segments separated by periods: a header, a payload and a signature. Each of the first two is base64url-encoded JSON; the third is the raw signature bytes, also base64url-encoded.

Header algorithm and type . Payload claims about the subject . Signature bytes, not JSON base64url(JSON) base64url(JSON) base64url(bytes) The signature covers the first two segments, so changing a claim breaks verification.

A header of {"alg":"HS256","typ":"JWT"} encodes to eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9. That string is the standard encoding of the default HMAC-SHA256 header. Seeing it tells you the signing algorithm, not who signed the token.

What the header tells you

The header is a small JSON object that describes how the token was protected. Three fields carry most of the meaning:

  • alg names the signature algorithm, such as HS256, RS256 or ES256. A verifier must accept only the algorithms it expects.
  • typ is usually JWT, an optional hint about the content type.
  • kid identifies which key was used, which matters when a provider rotates signing keys and publishes a key set.

Encrypted tokens, known as JWE, use a different compact form with five segments and a header that also describes the encryption algorithm. This decoder expects the three-segment signed form.

Registered claims in the payload

The payload is a JSON object. Some field names are registered by the JWT specification, which means their meaning is fixed even though their use is optional. Everything else is an application claim defined by whoever issues the token.

ClaimMeaningValue type
issIssuer that created the tokenString or URI
subSubject the token is about, usually a user IDString or URI
audIntended audience, such as the API nameString or array of strings
expExpiration time; the token must not be accepted after itNumeric date in seconds
nbfNot before; the token must not be accepted earlierNumeric date in seconds
iatTime the token was issuedNumeric date in seconds
jtiUnique identifier, useful for revocation listsString

A numeric date counts seconds since 1 January 1970 at 00:00 UTC. It is not milliseconds and it is not an ISO string. Reading a value such as 1700000000 requires multiplying by 1000 before it can be passed to a JavaScript date.

A typical access token payload might look like {"sub":"user-42","aud":"orders-api","iat":1700000000,"exp":1700003600}. The difference between exp and iat is the intended lifetime, one hour in this example.

How base64url encoding works

Base64url is standard Base64 with two substitutions: + becomes - and / becomes _. Padding characters are usually removed. Both changes exist so the value can travel safely in a URL, a cookie or an HTTP header without further escaping.

Decoding therefore reverses the substitutions, restores the missing padding until the length is a multiple of four, and then converts the bytes back to text. This decoder converts the result as UTF-8 so accented names and non-Latin identifiers display correctly.

base64url: - and _ instead of + and / padding: = removed, restored before decoding payload text: UTF-8 after the bytes are decoded

Base64 is not compression and it adds no security. A payload is roughly one third longer than the JSON it carries, which is why large claims make large headers.

Decoding is not verification

This page reads the bytes. It does not check the signature, the issuer, the audience or the expiry. A token can be decoded successfully and still be forged, expired or meant for another service.

Verification requires the key that matches alg. For HMAC algorithms the verifier holds the same secret that signed the token. For RSA and ECDSA algorithms the verifier holds the public key. The signature is computed over the exact text of the first two segments, so changing a single character invalidates it once verification runs.

The dangerous case is "alg":"none". It declares that no signature is present, and a naive verifier that reads the algorithm from the header can be tricked into accepting it. A server must choose the allowed algorithms from its own configuration and reject anything else, including none.

Treat the payload as public. Anyone holding the token can read every claim, so never put passwords, API keys, full card numbers or private personal data inside it. The token is protected against modification by the signature, not against reading.

Expiry, clock skew and common decoding errors

Servers usually allow a small clock skew when comparing exp and nbf, because the issuer and the verifier rarely share an exact clock. The allowance is a server setting, not part of the token, so the same token can be valid on one service and expired on another.

ProblemWhat you seeFix
Token copied with Bearer The first segment fails to decodeRemove the scheme prefix
Line breaks or spacesBase64 error or missing segmentsPaste the token as one continuous string
Only two segmentsThe decoder reports a malformed tokenCopy the full token including the signature
Five segmentsThe token is encrypted (JWE)Use a JWE-aware tool and the decryption key
Payload is not JSONJSON parse error after decodingConfirm the token follows JWS compact form
Expired tokenDecodes fine but the API returns 401Request a new token; check exp

A token that fails to decode in the browser may still be valid on the server if it was copied incompletely. Compare the number of segments and the last characters before assuming the token itself is broken.

Related Developer & Security Tools

Tool What does it do? Action
Base64 Encoder & Decoder Encode text to Base64 or decode a Base64 string back to plain text. Base64 Codec →
Hash Generator Create MD5, SHA-1, SHA-256 and SHA-512 hashes from text. Hash Maker →
UUID Generator Generate random UUID v4 values, one or many at a time. UUID Maker →
Password Generator Build strong random passwords with length and character options. Password Maker →
Regex Tester Test a regular expression against sample text and inspect the matches. Regex Test →
JWT Decoder Decode a JWT header and payload locally, without sending the token anywhere. Current Page

Frequently Asked Questions

No. It only decodes the header and payload so you can read the claims. Signature verification needs the signing key or public key and must happen on the server that accepts the token.

Decoding runs in your browser, so the token is not uploaded. Still, a token is a credential while it is valid. Use a test token rather than a production one, and revoke or rotate anything you paste into an unknown tool.

exp is the expiration time, iat is when the token was issued and nbf is the earliest time it may be used. All three are seconds since 1 January 1970 UTC, not milliseconds.

Five segments indicate a JSON Web Encryption (JWE) token rather than a signed JWS token. Its content is encrypted, so decoding requires the decryption key and a JWE-capable tool.

No. The payload is only encoded, not encrypted, and anyone with the token can read it. Store secrets on the server and keep the payload limited to identifiers and the claims the verifier actually needs.

Only the algorithms it was designed for, chosen from server configuration rather than from the token header. Never accept none unless the design explicitly calls for an unsecured token, which is rare and should be limited to non-sensitive contexts.