JWT 解析器JWT Decoder
解码和验证JSON Web TokenDecode and validate JSON Web Tokens.
关于 JWT 解析器About JWT Decoder
JWT(JSON Web Token)是接口鉴权与单点登录的常见载体。本工具在本地解码 JWT 的 Header 与 Payload,展示算法、签发者、过期时间等声明,并将时间戳转为可读时间,是排查登录鉴权问题的顺手工具。JWT (JSON Web Token) is a common bearer for API authentication and single sign-on. This tool decodes a JWT’s Header and Payload locally, showing the algorithm, issuer, expiration and other claims with timestamps rendered as readable times — handy for debugging auth issues.
使用方法How to Use
- 粘贴完整的 Token(形如 xxx.yyy.zzz 的三段结构)。Paste the complete token (the three dot-separated parts).
- 工具自动解码并展示 Header 与 Payload 的 JSON 内容。The tool automatically decodes and displays the Header and Payload JSON.
- 查看 exp、iat 等时间声明,工具已将其转换为可读时间。Inspect claims such as exp and iat, already converted to readable times.
- 根据过期时间与声明内容判断 Token 是否有效。Judge whether the token is valid based on expiry and claim values.
常见问题FAQ
把 Token 粘贴到这里安全吗?Is it safe to paste my token here?
解码在浏览器本地完成,不会上传。另外要明白 JWT 的 Payload 只是 Base64 编码而非加密,任何人拿到都能读,因此其中本就不应存放敏感信息。Decoding happens locally and nothing is uploaded. Also remember a JWT Payload is Base64-encoded, not encrypted — anyone holding it can read it, so it should never contain sensitive data in the first place.
能验证签名吗?Can it verify the signature?
本工具专注于解码查看。签名验证需要密钥或公钥,且应在服务端完成;在浏览器里放密钥反而会造成泄露。This tool focuses on decoding. Signature verification needs the secret or public key and belongs on the server; putting keys in a browser would leak them.
为什么解码失败?Why does decoding fail?
常见原因是 Token 复制不完整(漏掉某一段或点号)、带了 Bearer 前缀或多余空白。请粘贴完整的三段式字符串。Common causes are an incomplete copy (a missing segment or dot), a Bearer prefix, or extra whitespace. Paste the full three-part string.
相关阅读Related Reading
JWT 解析的 5 个常见报错:签名失效、过期、算法混淆与排查清单5 Common JWT Parsing Errors: Invalid Signature, Expiry, Algorithm Confusion and a Debug Checklist
JWT 看起来就是三段 Base64URL 拼起来的字符串,但实际联调时签名失效、过期、算法不匹配这类报错能耗掉大半天。本文整理我踩过的 5 个高频坑,附一个可直接照着走的排查清单A JWT looks like three Base64URL segments glued together, but in real integrations, invalid signatures, expiry and algorithm mismatches can eat half a day. This article collects five high-frequency pitfalls I've hit, plus a debug checklist you can follow step by step.
接口调试提效:JSON 格式化与校验的完整工作流Debug APIs Faster: A Complete JSON Formatting and Validation Workflow
面对一坨压缩 JSON,如何 30 秒内定位结构问题?本文分享一套“格式化 → 校验 → 转换 → 压缩”的实用工作流,覆盖接口调试与配置编写的常见场景。Facing a wall of minified JSON, how do you spot structural problems in 30 seconds? This article shares a practical format → validate → convert → minify workflow covering common API debugging and config authoring scenarios.
相关工具Related Tools
JSON 格式化JSON Formatter
在线JSON格式化、校验、压缩、美化工具Online JSON formatter, validator, compressor and beautifier.
正则表达式测试Regex Tester
在线正则表达式测试工具,实时匹配高亮Online regex tester with real-time matching and highlighting.
随机密码生成器Password Generator
生成高强度随机密码,支持自定义长度和字符集Generate strong random passwords with customizable length and charset.
UUID 生成器UUID Generator
在线生成UUID/GUID,支持批量生成Generate UUID/GUID online, supports batch generation.