iToolsPro

JWT Generator & Decoder

Create and decode JWTs online - sign tokens locally with HS256/384/512, or decode any token's header/payload and check expiry

Encode token
Algorithm
Payload (JSON)
Signing secret
Generated token
Decode token
Token
Signing secret (optional, to verify)
Header
Payload
Common claims
Header · Payload · Signature

JWT, signed and decoded locally

Sign tokens locally with HS256/384/512, or decode any token's header and payload and verify the signature and expiry.

100% local · zero upload

Features

Local signing
Signs with HS256/384/512 using Web Crypto in your browser - the secret never leaves your machine.
Instant decode
Paste a token to see its header and payload instantly with syntax highlighting.
Signature & expiry
Optionally verify the HMAC signature with a secret, and auto-check exp/iat/nbf timestamps.

Use cases

🔐 Authentication 🔑 OAuth / OpenID 🌐 API auth 🐛 Token debugging

JWT 生成 / 解析使用指南JWT Generator & Decoder Guide

了解 JWT 结构、签名算法与常见问题。How JWTs work, signing algorithms, and answers to common questions.

JWT 结构JWT Structure

JWT 由三段 Base64Url 编码组成:Header(算法与类型)、Payload(声明)、Signature(签名)。本工具支持 HS256/HS384/HS512 签名。

A JWT has three Base64Url-encoded parts: Header (algorithm and type), Payload (claims) and Signature. This tool signs with HS256/HS384/HS512.

常见声明:iss(签发者)、sub(主体)、aud(受众)、exp(过期时间)、iat(签发时间)、nbf(生效时间)、jti(JWT ID)。

Common claims: iss (issuer), sub (subject), aud (audience), exp (expiry), iat (issued at), nbf (not before), jti (JWT ID).

使用步骤How to Use

  1. 生成:选择算法、填写 payload 与密钥,点击「生成 JWT」。Generate: pick an algorithm, fill the payload and secret, then click "Generate JWT".
  2. 解析:粘贴 Token,实时查看 header 与 payload。Decode: paste a token to see its header and payload instantly.
  3. 校验:输入密钥验证签名,查看过期状态。Verify: enter the secret to validate the signature and check expiry.

常见问题FAQ

Q1. 支持 RS256 吗?Q1. Does it support RS256?

当前支持对称签名 HS256/384/512;RS256 需私钥,可在解析时手动比对签名。Currently HMAC HS256/384/512. RS256 requires a private key; you can verify its signature manually.

Q2. 密钥会泄露吗?Q2. Is my secret leaked?

不会,签名全程在浏览器本地完成,密钥不离开本机。No - signing happens entirely in your browser; the secret never leaves your machine.

Q3. 如何判断 Token 是否过期?Q3. How do I know if a token expired?

工具会读取 payload 中的 exp 字段并与当前时间比对,自动标注。The tool reads the exp claim and compares it with the current time automatically.