JWT(JSON Web Token)是现代 Web API 表示身份验证和授权声明的标准方式。它是一种紧凑、自包含的令牌,由三部分组成——描述签名算法的头部、承载实际声明(如用户 ID、角色和过期时间)的载荷,以及让接收服务器能够验证令牌未被篡改的签名。
这款解码器即时读取头部和载荷,帮助你调试身份验证问题、检查 API 实际发送了哪些声明,或查看令牌何时过期——完全无需后端、命令行工具,也无需将敏感令牌粘贴到第三方服务器,因为一切都在你的浏览器本地运行。
何时使用此计算器
Debugging why an API rejects a token by inspecting its claims and expiration time
Checking a token's expiration time during a support investigation or incident response
验证 SSO 或 OAuth 提供商是否正在发出您的应用程序所期望的声明。
Learning how JWTs are structured for interview preparation or security coursework
Inspecting a token captured from browser dev tools or server logs to understand its contents
Comparing the header algorithm between tokens to debug algorithm-mismatch authentication failures
A JSON Web Token (JWT) is a compact, URL-safe way to represent claims between two parties. It consists of three Base64URL-encoded parts separated by dots: a header, a payload, and a signature.
Is it safe to paste my JWT into this tool?
常见算法包括 HS256(HMAC-SHA256,对称)、RS256(RSA-SHA256,非对称)和 ES256(ECDSA)。头部中的 'alg' 字段指定算法。Web API 最常用的是 HS256 或 RS256。