alg(如 HS256 / RS256)与令牌类型 typ(通常为 JWT)。sub(主题)、exp(过期时间戳)、iat(签发时间)、nbf(生效时间)、iss/aud。HMAC-SHA256(base64url(header) + "." + base64url(payload), 密钥) 再 Base64url 编码;RS256 则用私钥做 RSA 签名、公钥验签。alg=none 漏洞可让攻击者伪造令牌,务必在服务端强制校验算法与过期时间。Fill in the payload and secret - HMAC is computed locally in the browser with WebCrypto to produce the full token, ready for API debugging and local testing.
| 字段 | 说明 |
|---|---|
| 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.