Files

163 lines
4.6 KiB
HTML

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<link rel="icon" href="../../favicon.svg">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>JWT 解码器 - JustHTMLs</title>
<link rel="canonical" href="https://www.htmls.dev/tools/jwt-decoder/">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
padding: 20px;
}
.container {
max-width: 900px;
margin: 0 auto;
}
.header {
text-align: center;
color: white;
margin-bottom: 30px;
}
.header h1 {
font-size: 2.5rem;
margin-bottom: 10px;
}
.card {
background: rgba(255, 255, 255, 0.95);
border-radius: 20px;
padding: 40px;
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
margin-bottom: 20px;
}
.card h2 {
color: #333;
margin-bottom: 20px;
font-size: 1.5rem;
}
.card p {
color: #666;
line-height: 1.8;
margin-bottom: 15px;
}
.features {
list-style: none;
margin-top: 20px;
}
.features li {
padding: 10px 0;
color: #555;
border-bottom: 1px solid #eee;
}
.features li:before {
content: "✓";
color: #667eea;
font-weight: bold;
margin-right: 10px;
}
.btn {
display: inline-block;
padding: 14px 30px;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
text-decoration: none;
border-radius: 10px;
font-weight: 600;
transition: all 0.3s;
margin: 10px 10px 10px 0;
}
.btn:hover {
transform: translateY(-2px);
box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}
.btn-secondary {
background: #6c757d;
}
.preview {
background: #f8f9fa;
border-radius: 12px;
padding: 20px;
}
.preview iframe {
width: 100%;
height: 450px;
border: none;
border-radius: 8px;
}
</style>
</head>
<body>
<div class="container">
<div class="header">
<h1>JWT 解码器</h1>
<p>解码和验证 JSON Web Token</p>
</div>
<div class="card">
<h2>关于这个工具</h2>
<p>JWT (JSON Web Token) 是一种用于双方之间传递安全信息的开放标准 (RFC 7519)。这个工具可以帮你解码 JWT 并查看其内容,包括头部、负载和签名部分。</p>
<h2>功能特点</h2>
<ul class="features">
<li>实时解码 JWT Token</li>
<li>显示 Header、Payload、Signature 三部分</li>
<li>检查 Token 过期时间</li>
<li>格式化 JSON 输出</li>
<li>一键复制各部分内容</li>
<li>完全在浏览器本地运行,保护隐私</li>
</ul>
<h2>使用场景</h2>
<ul class="features">
<li>调试 API 认证问题</li>
<li>查看 Token 中的用户信息</li>
<li>学习 JWT 结构</li>
<li>检查 Token 是否过期</li>
<li>分析 JWT 内容</li>
</ul>
<h2>注意事项</h2>
<p>此工具仅进行 Base64 解码,不会验证签名。请不要将敏感的 Token 粘贴到任何在线工具中。</p>
<div style="margin-top: 30px;">
<a href="app.html" class="btn">开始使用</a>
<a href="https://github.com/justhtmls/html-tools/tree/main/tools/jwt-decoder" target="_blank" class="btn btn-secondary">查看源码</a>
<a href="../../index.html" class="btn btn-secondary">返回首页</a>
</div>
</div>
<div class="card">
<h2>快速预览</h2>
<div class="preview">
<iframe src="app.html" loading="lazy"></iframe>
</div>
</div>
</div>
<script src="../../assets/clicks.js" defer></script>
</body>
</html>