DevToolBox免费
博客

JWT Token 解码器

在线解码和检查 JWT 令牌。即时查看任何 JSON Web Token 的 Header、Payload 和 Signature。

JWT 结构参考

JWT 结构

JWT 由三个 Base64URL 编码的部分组成,用点分隔:Header.Payload.Signature

Header
Algorithm + Type
.
Payload
Claims / Data
.
Signature
Verification

Header 字段

FieldNameDescription
algAlgorithmSigning algorithm (HS256, RS256, ES256, etc.)
typTypeToken type, typically "JWT"
kidKey IDIdentifier for the signing key used
jkuJWK Set URLURL to the JSON Web Key Set
x5uX.509 URLURL to the X.509 certificate chain

注册 Payload 声明

ClaimNameDescription
issIssuerEntity that issued the JWT
subSubjectSubject of the JWT (user ID)
audAudienceRecipient(s) the JWT is intended for
expExpirationTimestamp after which the JWT expires
nbfNot BeforeTimestamp before which the JWT is not valid
iatIssued AtTimestamp when the JWT was issued
jtiJWT IDUnique identifier for the JWT

常见问题

什么是 JSON Web Token (JWT)?
JSON Web Token (JWT) 是一种紧凑的、URL 安全的令牌格式,用于在各方之间安全传输 JSON 对象形式的信息。它由三部分组成:Header(算法和令牌类型)、Payload(声明/数据)和 Signature(签名)。JWT 广泛用于 Web 应用程序和 API 的认证和授权。
可以在没有密钥的情况下解码 JWT 吗?
可以。JWT 的 Header 和 Payload 只是 Base64URL 编码的,而非加密的。任何拥有令牌的人都可以解码并读取这些部分。密钥仅用于验证签名。因此不应在 JWT Payload 中存储敏感信息。
JWT 与 Session Cookie 有什么区别?
Session Cookie 在客户端存储会话 ID,实际数据保存在服务器端。JWT 是自包含的令牌,携带所有必要数据。JWT 是无状态的,适合分布式系统和 API,而 Session Cookie 需要服务器端存储。

相关 JWT 工具

𝕏 Twitterin LinkedIn

评价此工具

4.0 / 5 · 145 人评价

保持更新

获取每周开发技巧和新工具通知。

无垃圾邮件,随时退订。

Enjoy these free tools?

Buy Me a Coffee