跳到主內容

JWT解碼器

開發者工具

解碼標頭與有效負載,檢查聲明與過期時間

答案速覽

JWT Decoder: Decode header/payload, inspect claims and expiry. Three Base64URL segments: Header.Payload.Signature.

簽發時間1/18/2018, 09:30:22
過期時間9/22/2030, 00:37:02
演算法HS256
類型JWT

Header

{
  "alg": "HS256",
  "typ": "JWT"
}

Payload

{
  "sub": "1234567890",
  "name": "张上测试下统",
  "iat": 1516239022,
  "exp": 1916239022
}

簽名(原文)

SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c

驗籤需要金鑰——切勿把生產環境 token 和金鑰一起貼到線上工具。

解碼過程

  1. 1按 "." 拆成三段:頭部 / 負載 / 簽名
  2. 2對每段做 Base64url 解碼:-_ 換回 +/、補齊 = 填充、按 UTF-8 解碼
  3. 3JSON.parse 頭部與載荷 → 查看 alg / typ / 宣告欄位
  4. 4exp = 1916239022 → compare with current time → pending
  5. 5此處不驗籤——驗籤需要金鑰,必須在伺服端完成

標準聲明欄位(RFC 7519)

欄位含義本 token
iss簽發方—
sub主體(使用者識別)1234567890
aud接收方—
exp過期時間(unix 秒)1916239022
iat簽發時間(unix 秒)1516239022
nbf生效時間—
jti唯一標識(防重放)—
JWT = base64url(header).base64url(payload).base64url(signature). The payload is only ENCODED, not encrypted — anyone can read it; never put passwords or sensitive data inside. Check `alg` isn't "none" and always verify signature + exp server-side.

這個工具對你有幫助嗎?

怎麼用

  1. Paste or type content: drop code/text into the JWT Decoder or fill the parameters.
  2. Choose mode/options: switch format, rules or processing as needed.
  3. Live output: results appear instantly — nothing is submitted, data stays in your browser.
  4. One-click copy: copy the output straight into your development environment.

核心要點

  • JWT Decoder is a free online developer tool — open and use, no sign-up.
  • All calculations run locally in your browser; your data never leaves the device.
  • Key capability: Decode header/payload, inspect claims and expiry.
  • Results come with formulas and reference tables so you can verify every number.

原理與公式

JWT structure (JSON Web Token)

Three Base64URL segments: Header.Payload.Signature
Header: alg + typ; Payload: claims (sub/iss/exp/iat/nbf)
Timestamps are Unix seconds; expired when exp < now
Base64URL: +/ → -_, padding = dropped
Decoding ≠ verifying — never put secrets in the payload

Example: {alg: HS256} {sub: 1234} is readable by anyone holding the token.

常見問題

How do I use the JWT Decoder?
Open the page and fill in the input fields — results update automatically. Decode header/payload, inspect claims and expiry.
Are the results accurate?
Yes. Standard formulas and conversion factors are used and verified.
Is it free? Do I need to sign up?
Completely free. No registration, login or download required.
Does it work on mobile?
Yes. The responsive design works on phones, tablets and desktops.
Is my data saved?
No. Everything runs locally in your browser.

相關工具

相關指南

來源與更新

Based on RFC 4648, ECMA-262 and related specifications. Last updated: 2025-07

最近更新:

本頁公式與內容經YiJianSuan團隊覆核,僅供學習參考,實際業務請以官方口徑為準。

內容由YiJianSuan編輯團隊維護並定期覆核,更新與審核流程詳見編輯規範.

引用本頁: YiJianSuan. JWT解碼器[EB/OL]. https://www.yijiansuan.com/zh-TW/c/dev/jwt

本工具提供的結果僅供參考,不構成任何專業建議,請以官方核算為準。