JWT decoder
Paste a JSON Web Token to read its header and claims, check its expiry and verify an HMAC signature.
This free JWT debugger works in your browser. Everything runs in your browser. What you type is not sent anywhere. All inputs and calculations run locally on your device without server uploads; details on browser processing and storage are set out in the privacy policy.
The three parts of a JWT
A JWT is three Base64URL strings joined by dots: a header naming the signing algorithm, a payload of claims about the user or session, and a signature. Anyone can decode the first two parts; the signature is what proves the token was not changed.
| Claim | Means |
|---|---|
| iss | Who issued the token |
| sub | Who the token is about, usually a user ID |
| aud | Which service should accept it |
| exp | Expiry time, in Unix seconds |
| iat | When it was issued |
| nbf | Not valid before this time |
Security notes
- Decoding is not verifying. Only trust a token after its signature has been checked with the right key.
- Tokens are often live credentials. This page decodes them locally and never sends them anywhere, but avoid pasting production tokens into tools you do not trust.
- A token with
"alg": "none"is unsigned. Servers should reject it. - RS256 and ES256 tokens are signed with a private key and checked with a public key; this page decodes them but verifies only HMAC (HS) signatures.
Worked example: Decoding a 3-part HS256 JWT and checking its expiry claim
A JSON Web Token (RFC 7519) consists of three Base64URL-encoded segments separated by two dots (header.payload.signature). Take this sample token:
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ1c3JfOTAxMiIsInJvbGUiOiJxYV9sZWFkIiwiaWF0IjoxNzMxNTYwNDAwLCJleHAiOjE3MzE1NjQwMDB9.8xK9_sample_sig
- Part 1 — Header (
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9): Decodes from Base64URL to{"alg":"HS256","typ":"JWT"}, showing the token is signed with HMAC-SHA256. - Part 2 — Payload claims: Decodes to
{"sub":"usr_9012","role":"qa_lead","iat":1731560400,"exp":1731564000}. Converting the Unix epoch timestamps (1731560400and1731564000) shows the token was issued at2024-11-14T05:00:00Zand expired 1 hour later at2024-11-14T06:00:00Z(3,600 secondslifetime). - Part 3 — Signature: Computed over the exact ASCII string
base64url(header) + "." + base64url(payload)using the server's secret key.
Limits and what this tool cannot do
- Cannot decode encrypted JWE tokens (5-part tokens): Standard signed JWTs (JWS) have **3 parts** separated by 2 dots and their payload is readable by anyone. JSON Web Encryption (JWE) tokens have **5 parts** separated by 4 dots (
header.encrypted_key.iv.ciphertext.tag); their payload is encrypted and cannot be read without the private decryption key. - Decoding a token does not prove it is authentic: Anyone can Base64URL-encode a fake payload claiming
"role": "superadmin". A token is only trustworthy after verifying the cryptographic signature against the issuer's HMAC secret or RSA/ECDSA public key. - Never paste production HMAC secrets into untrusted sites: While this decoder runs 100% locally in your browser with zero network requests, you only need to paste the JWT itself (not your server's private signing key) to inspect the header and payload claims.
Questions
Can I decode a JWT without the secret?
Yes. The header and payload are only encoded, not encrypted. The secret is needed only to verify the signature.
Why does my token show as expired?
Its exp time is in the past according to your device clock.
Is the token sent to a server?
No. Everything runs in your browser. What you type is not sent anywhere.
Why can I read the payload of my JWT without entering a secret key?
A standard JWT (JWS) is *signed*, not *encrypted*. The header and payload are simply Base64URL-encoded JSON so clients and API gateways can read the user ID and expiry time, while the signature prevents anyone from tampering with those claims.
What do the standard 3-letter claim names sub, iss, aud, iat, nbf, and exp mean?
iss is Issuer, sub is Subject (usually user ID), aud is Audience (target API), iat is Issued At (Unix seconds), nbf is Not Before, and exp is Expiration Time (Unix seconds).
Why does my token have 5 parts separated by 4 dots instead of 3 parts?
A 5-part token is an encrypted JWE (JSON Web Encryption, RFC 7516) token rather than a signed JWS token, or an opaque proprietary token format.
Related converters and guides
- Base64 encode and decodeTurn text into Base64 and back, with full Unicode support.
- Unix timestamp converterEpoch seconds and milliseconds to dates, and back.
- JSON formatterFormat, validate and minify JSON, with the error position shown.
- Encoder and decoderBase64, URL, HTML entities, hex, binary and Unicode escapes.