Decode a three-segment signed JWT in the browser. The header and payload are shown as the original JSON from the token, and exp, nbf, and iat are also shown in UTC. Signature verification uses the token's original signing input and does not re-encode the JSON. You choose the expected algorithm: HS256 uses a UTF-8 test secret, and RS256 uses a SubjectPublicKeyInfo public key.
Signature, validity (exp and nbf), issuer (iss), and audience (aud) are reported separately. The test time is an integer number of Unix seconds. A check is marked Not checked when its secret, public key, test time, or expected value is left empty. There is no clock skew: a test time greater than or equal to exp is expired, and a test time greater than or equal to nbf passes the nbf check. The token and keys stay in memory for this page. They are not written to the URL, browser storage, or analytics.
Token
Decoded claims
Header
Payload
Signing input
| Claim | Original value | UTC |
|---|
Checks
Validity (exp, nbf)
Issuer (iss)
Audience (aud)
Public samples
These vectors can be recomputed with Node.js HMAC-SHA256 and RSA-SHA256. The signing input is the original text before the second dot. The secret is used as UTF-8 bytes and is not trimmed.
HS256
- Secret
- UTF-8, 18 bytes:
devtest-jwt-secret - Header
- UTF-8, 27 bytes:
{"alg":"HS256","typ":"JWT"} - Payload
- UTF-8, 108 bytes:
{"iss":"devtest.run","aud":"charge-point","sub":"cp-001","iat":1700000000,"nbf":1700000000,"exp":1700003600} - Signature
- 32 bytes
- iat / nbf
- 1700000000 · 2023-11-14T22:13:20.000Z
- exp
- 1700003600 · 2023-11-14T23:13:20.000Z
- Valid test time
- 1700001800 · 2023-11-14T22:43:20.000Z
- Expected at that time
- Signature, validity, issuer, and audience all pass.
- Time equal to exp
- 1700003600: the signature still passes, and validity fails.
- Time equal to nbf
- 1700000000: validity passes. One second earlier, 1699999999, fails nbf.
- Token
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJkZXZ0ZXN0LnJ1biIsImF1ZCI6ImNoYXJnZS1wb2ludCIsInN1YiI6ImNwLTAwMSIsImlhdCI6MTcwMDAwMDAwMCwibmJmIjoxNzAwMDAwMDAwLCJleHAiOjE3MDAwMDM2MDB9.2hFKnVtwDOqk-_T1zlbLcQCDcMZCJly_Xwer6bwRwLs
RS256
- Header
- UTF-8, 27 bytes:
{"alg":"RS256","typ":"JWT"} - Payload
- Same JSON as the HS256 sample, UTF-8, 108 bytes.
- Public key
- PEM 451 bytes, SPKI DER 294 bytes.
- Signature
- 256 bytes. The same test times have the same validity result as HS256.
-----BEGIN PUBLIC KEY----- MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0Hmil0dRELyD76urMYvD pWBzTkL336Z46fdZgd+v2rGY1ZKvxfJwrbiz1aKzMENQEJa1AIhH1biv2vrhoryl o4kPIQSVRLbSVDTmYxsRwLvkGlNXolOVQhLIRqttuxz2vE8kD3IGAN35Di3Hmdbw BPdsvuQNMjjWKKFFpOX9l+xdIeRMVYVpVF8gGaDwGSvo4VUFCCf+9j46FhddEDpA chjsJFJY3yjySQZ3rtYxwoOz/Bg+YFpaP4P1YhQW2SyUYQTCV5sBzRh1jqqvYUAO xVB1R0KGxNyxl1VRanDkPM9R3C82jJuwf6Zg8GSOfY5fpXBnDOFFYN7Gh2g+lsFB 0QIDAQAB -----END PUBLIC KEY-----
eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJkZXZ0ZXN0LnJ1biIsImF1ZCI6ImNoYXJnZS1wb2ludCIsInN1YiI6ImNwLTAwMSIsImlhdCI6MTcwMDAwMDAwMCwibmJmIjoxNzAwMDAwMDAwLCJleHAiOjE3MDAwMDM2MDB9.xQ_KswF5cHFWFPWoe6ryfB4HHdJw787Pilb4jHrg7Y99hm84bTKAz9LN_Li-o0dBRvaiMcywsGN2YgXstm6wXLoq8Eyf9ig95am7aw0GTX7bSoyYsTNmj56SBnGyEhXSdsqSDlX-ZNpgOaTbn7gmfczGitEmdW_lqud0FgJ2DHStO_OZGiB_bhzkX9i0TOIjxt4PqbymU057mpE7YcxoeSmDj4zMdJ5rkrZHKxPQPOQMMsQP8KNgC4wVLeIfzFFXAadX8hTpJeei35uC6oHWjYWUmLzAI7_PrIwFJ4snGaLkxxPV0zMMaCcp_o67Lo2nph-NC9_CrJQNtm7Quhbpvw