alg(如 HS256 / RS256)與令牌型別 typ(通常為 JWT)。sub(主題)、exp(過期時間戳)、iat(簽發時間)、nbf(生效時間)、iss/aud。HMAC-SHA256(base64url(header) + "." + base64url(payload), 密钥) 再 Base64url 編碼;RS256 則用私鑰做 RSA 簽名、公鑰驗籤。alg=none 漏洞可讓攻擊者偽造令牌,務必在服務端強制校驗演算法與過期時間。填寫 Payload 與金鑰,瀏覽器本地用 WebCrypto 計算 HMAC 簽名並生成完整 Token,可直接用於介面聯調與本地測試。
| 欄位 | 說明 |
|---|---|
| alg | Signing algorithm (HS256/RS256/ES256 etc.) |
| typ | Token type, typically JWT |
| iss | Issuer |
| sub | Subject (usually user ID) |
| aud | Audience |
| exp | Expiration time |
| nbf | Not-before time |
| iat | Issued At time |
| jti | JWT ID |
JWT decoder for developers. Runs fully in your browser and never sends code or data to a server.