JWT Decoder
Decode JWT header and payload without verification
JWT Decoder — what it does
Paste a JSON Web Token and read its header and payload decoded into readable JSON. A JWT is three Base64URL segments separated by dots, and the first two are not encrypted — anyone holding the token can read the claims inside, which is exactly what this shows you.
Worked example
An HS256 token issued at 2026-10-20 08:00 UTC and expiring one year later, pasted and decoded; the signature segment is a placeholder, which the decoder does not check.
JWT token
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMDQyIiwibmFtZSI6IkFubiBMZWUiLCJlbWFpbCI6ImFubi5sZWVAZXhhbXBsZS5jb20iLCJyb2xlIjoiZWRpdG9yIiwiaWF0IjoxNzkyNDgzMjAwLCJleHAiOjE4MjQwMTkyMDB9.XoNw9k2Vq1Jt6Hq3eGm8Yz4rK0uPbA5cD7fL9sT2vWE
Output — decoded header and payload
Header
{
"alg": "HS256",
"typ": "JWT"
}
Payload
{
"sub": "1042",
"name": "Ann Lee",
"email": "ann.lee@example.com",
"role": "editor",
"iat": 1792483200,
"exp": 1824019200
}The status line reads "Valid until …" with the exp time in your browser's local time zone; a token whose exp is in the past shows "Expired" in red, and one without exp shows "No expiration claim".
When this tool helps
- Checking the claims and expiry in a token while debugging an authentication failure.
- Confirming which algorithm and key identifier a token's header declares.
- Understanding what user data a service is embedding in the tokens it issues.
How to use it
- Paste the JWT into the input field.
- Decode it.
- Read the header, including the algorithm.
- Read the payload claims, including expiry and subject.
Accuracy, limits, and good practice
- The exp claim is a Unix timestamp in seconds — run it through the timestamp converter to see the actual expiry moment.
- Decoding is not verification. This shows what the token says; only checking the signature with the key proves it was not tampered with.
- Never paste a live production token into a tool you do not trust. Here decoding happens locally, but the habit matters everywhere else.
Frequently asked questions
Is a JWT encrypted?
No. Standard JWTs are signed, not encrypted. Header and payload are readable by anyone who has the token.
Does this verify the signature?
No, verification needs the signing key. This decodes the readable segments only.
Why does my token show as expired?
Compare the exp claim against the current time. Clock skew between client and server is a frequent cause of borderline failures.
Can I paste the whole Authorization header?
Yes. A leading "Bearer " (in any letter case) is removed before decoding, so "Bearer eyJhbGciOi…" decodes to the same header and payload and the same "Valid until" status as the bare token. Surrounding whitespace and line breaks are trimmed as well.
Does the token need all three parts?
Yes. Anything other than exactly three dot-separated parts stops with "Invalid JWT: expected three dot-separated parts (header.payload.signature).", and after any error the Header and Payload panes are reset to "—", so a previously decoded token is not left on screen. The signature itself is never checked and may even be empty: header.payload. with a trailing dot decodes normally. "Valid until" therefore refers only to the exp timestamp, never to authenticity.
Related tools on this site
- Fixed-width Text Wrapper — Wrap paragraphs to a chosen line width without breaking words
- Line Sorter — Sort text lines alphabetically, numerically, or by length
- Text Case Converter — Uppercase, lowercase, title case
Further reading: Cleaning Up Text You Pasted From Somewhere Else
Everything above runs inside this page. JWT Decoder needs no account, no upload, and no server round trip — close the tab and nothing is left behind.
JWT 解碼器能做什麼
貼上 JSON Web Token,即可讀到解碼後的標頭與內容 JSON。JWT 是以點分隔的三段 Base64URL,其中前兩段並未加密——任何拿到 token 的人都能讀到裡面的宣告,而這正是本工具呈現給你看的。
實際範例
一枚 HS256 token,簽發於 2026-10-20 08:00 UTC、一年後到期,貼上後解碼;簽章段落只是佔位字串,解碼器並不檢核。
JWT token
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMDQyIiwibmFtZSI6IkFubiBMZWUiLCJlbWFpbCI6ImFubi5sZWVAZXhhbXBsZS5jb20iLCJyb2xlIjoiZWRpdG9yIiwiaWF0IjoxNzkyNDgzMjAwLCJleHAiOjE4MjQwMTkyMDB9.XoNw9k2Vq1Jt6Hq3eGm8Yz4rK0uPbA5cD7fL9sT2vWE
解碼後的 header 與 payload
Header
{
"alg": "HS256",
"typ": "JWT"
}
Payload
{
"sub": "1042",
"name": "Ann Lee",
"email": "ann.lee@example.com",
"role": "editor",
"iat": 1792483200,
"exp": 1824019200
}狀態列顯示「Valid until …」,exp 時間以瀏覽器所在時區呈現;exp 已過的 token 會以紅字顯示「Expired」,沒有 exp 的則顯示「No expiration claim」。
什麼時候用得上
- 除錯驗證失敗時,檢查 token 的宣告與到期時間。
- 確認 token 標頭宣告的演算法與金鑰識別碼。
- 了解某個服務在它簽發的 token 中嵌入了哪些使用者資料。
使用步驟
- 把 JWT 貼進輸入欄。
- 執行解碼。
- 閱讀標頭,包含演算法。
- 閱讀內容宣告,包含到期時間與主體。
精確度、限制與實務建議
- exp 宣告是以秒為單位的 Unix 時間戳——丟進時間戳轉換工具即可看到實際到期時刻。
- 解碼不等於驗證。這裡顯示的是 token 說了什麼;只有用金鑰檢查簽章,才能證明它沒被竄改。
- 絕不要把正式環境的有效 token 貼進不信任的工具。此處解碼在本機進行,但這個習慣在別處同樣重要。
常見問題
JWT 有加密嗎?
沒有。標準 JWT 是簽章而非加密,標頭與內容任何持有 token 的人都讀得到。
這會驗證簽章嗎?
不會,驗證需要簽章金鑰。本工具只解碼可讀的段落。
為什麼我的 token 顯示已過期?
請把 exp 宣告與目前時間比對。用戶端與伺服器的時鐘偏移,常造成臨界失敗。
可以把整個 Authorization 標頭貼上嗎?
可以。開頭的「Bearer 」(大小寫皆可)會在解碼前被去掉,所以「Bearer eyJhbGciOi…」會解出相同的 header 與 payload,狀態列也同樣顯示「Valid until」。前後的空白與換行也會自動修剪。
token 一定要三段齊全嗎?
是。只要不是剛好三段以點分隔,就會停在「Invalid JWT: expected three dot-separated parts (header.payload.signature).」;任何錯誤發生後,Header 與 Payload 兩格都會重設成「—」,先前解出的 token 不會留在畫面上。簽章本身從不檢核,甚至可以是空的:結尾帶點的 header.payload. 也能正常解碼。因此「Valid until」只表示 exp 時間戳,與真偽無關。
本站相關工具
延伸閱讀: 清理從別處貼上的文字
以上步驟全部在這個頁面內完成,JWT 解碼器 不需要註冊、不上傳檔案、也不經過伺服器,關閉分頁後不會留下任何資料。