JWT 解码

解码 JWT:头部、载荷与过期时间

Inspect JWT claims without touching production

Authentication bugs are often token bugs — a missing claim, a wrong audience, an expired exp, the wrong algorithm. Decoding a JWT in the browser shows you the header, payload, and expiry instantly without sending the token to any server, so you can debug login, authorization, and API access issues with confidence.

Use the decoder when you need to

Debug an expired or rejected token

Look at the exp, nbf, and iat claims to confirm whether the token is past its lifetime or not yet valid.

Verify the claims your backend expects

Check that the audience, issuer, scopes, and custom claims match what your authorization layer requires.

Audit a token before pasting it into a ticket

Decode the payload to confirm there's nothing sensitive inside before sharing the token in a bug report.

How to decode a JWT quickly

  1. 1

    Paste the JWT (the long string with two dots) into the input field.

  2. 2

    Inspect the decoded header, payload, and expiry status.

  3. 3

    Copy specific claims or the full payload for use in a bug report or test.

Common JWT debugging workflows

Diagnose 401 errors from an API

Decode the token to see if the expected claim is missing or the audience is wrong.

Check token expiry during integration

Confirm a freshly minted token's expiry matches your auth provider's configured lifetime.

Audit roles and scopes

Verify the user has the right scopes before troubleshooting authorization in your code.

相关工具

常见问题

把完整的 JWT(由两个点分隔成三段的长字符串)粘贴到输入框。工具会立刻解码 header(算法、类型)和 payload(claims、过期时间、签发方等),不需要任何 secret key。

安全。解码完全在你的浏览器里用 JavaScript 完成,不会把数据发送到服务器。JWT 是编码(Base64URL)而不是加密,所以解码不需要你的密钥。

JWT 由三段 Base64URL 编码内容组成,用点号分隔:Header(算法与 token 类型)、Payload(claims,例如用户 ID、过期时间、角色等)、Signature(用于证明 token 未被篡改的签名)。

粘贴 token 后查看解码后的 payload 里的 exp(expiration)字段。工具会同时显示原始 Unix 时间戳和可读日期,并提示当前是否已过期。