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.