JWT 解码器
粘贴令牌即解码:header/payload 格式化展示、exp/iat/nbf 日期化与过期徽章、alg=none 红色警告(明确不验签)。
…
…
…
Security notes
A JWT has three Base64URL parts. This tool only decodes it: the signature is not verified (that requires the secret key or public key and must happen server-side), so a decoded token proves nothing by itself. alg = none is highlighted in red because it historically enabled trivial forgery. Claims exp, iat and nbf are rendered as dates; the expiry badge compares exp with your device clock.
如何使用JWT 解码器
粘贴完整令牌(三段点号分隔),header 与 payload 立即解码成格式化 JSON,标准声明(sub、iss、aud、exp)在值旁带解释。exp 与本地时钟比对,过期徽章一眼可见。
解码不等于验签:签名的重算需要密钥本体,把这个工具当读者而非守门员。全部计算在浏览器内完成,生产形态的 token 也可以放心查看——但解码后的 payload 对任何持有令牌的人都可读,分发时也请记住这一点。
常见问题
解码 JWT 等于验证签名吗?
不等于。解码只是把 header 与 payload 做 Base64 还原,让人能读到 sub、exp、iss 等声明。验证签名需要密钥与本体的加密库。
把令牌粘贴到这里安全吗?
工具完全在浏览器内运行,不做任何传输。但仍请把令牌当密码看待——谁能拿到令牌字符串,谁就能读到解码后的载荷。
签名部分为什么是乱码?
签名是用 HMAC 或 RSA 处理过的原始字节,再以 Base64 打印,乱码属正常现象。真正有意义的信息在 header 与 payload 两段。
exp 声明是什么意思?
exp 是 Unix 过期时间戳。解码器会用你本地时钟判断令牌是否过期,调试会话有效期时很有用。