สร้างและลงชื่อ HS256 JSON Web Tokens จาก payload และ secret ทั้งหมดในเบราว์เซอร์ของคุณ
วิธีใช้ JWT Generator
แก้ไข payload เป็น JSON object
ป้อน HS256 secret ของคุณ
สร้างและคัดลอก token ที่ลงชื่อแล้ว
A JWT generator that builds and signs JSON Web Tokens from your payload and secret, entirely in your browser using the Web Crypto API. It pairs with the JWT decoder, which inspects an existing token.
A JWT has three parts separated by dots: a header, a payload of claims, and a signature, each Base64url encoded. The signature is what makes the token trustworthy: it proves the payload has not been altered and was issued by someone who holds the secret.
This tool signs with HS256, that is HMAC using SHA-256, the most common symmetric JWT algorithm. The same secret both signs and verifies the token, so it must be kept private on the server.
For HS256, use a long, random secret. A short or guessable secret undermines the whole token, since anyone who guesses it can mint valid tokens of their own.
An important point about JWTs: the payload is only encoded, not encrypted. Anyone with the token can read its claims by Base64-decoding them, so never put passwords or sensitive data in a JWT. The signature stops tampering, it does not provide secrecy.
Because signing happens locally, your secret and payload never leave your device. Even so, avoid pasting real production secrets on a shared or public computer.
คำถามที่พบบ่อย
HS256 (HMAC กับ SHA-256) ซึ่งเป็น symmetric JWT algorithm ที่พบบ่อยที่สุด ลงชื่อในเบราว์เซอร์ของคุณด้วย Web Crypto API
ไม่ การลงชื่อเกิดขึ้นทั้งหมดในเบราว์เซอร์ของคุณ ดังนั้น secret และ payload จะไม่ออกจากอุปกรณ์ อย่างไรก็ตาม หลีกเลี่ยง production secrets จริงบนเครื่องที่ใช้ร่วมกัน
ใช่ ใช้เครื่องมือ JWT decoder เพื่อตรวจสอบส่วนหัวและ payload ของ token ที่มีอยู่
ฝังเครื่องมือนี้
เพิ่มเครื่องมือนี้ลงในเว็บไซต์ของคุณเอง คัดลอกสคริปต์ด้านล่าง โดยจะอัปเดตให้เป็นปัจจุบันโดยอัตโนมัติ
<iframe src="https://monu.tools/embed/th/jwt-generator" width="100%" height="640" style="border:1px solid #e5e5e5;border-radius:12px;max-width:680px" loading="lazy" title="Monu Tools"></iframe>เครื่องมือที่เกี่ยวข้อง
ค้นหาและดูรหัสสถานะ HTTP และความหมาย จาก 1xx ถึง 5xx
แปลงไฟล์ .env เป็น JSON และ JSON กลับเป็น .env ในทั้งสองทิศทาง ทั้งหมดในเบราว์เซอร์ของคุณ
สร้าง HMAC สำหรับข้อความและคีย์ความลับโดยใช้ SHA-1, SHA-256, SHA-384 หรือ SHA-512 ในเบราว์เซอร์ของคุณ
Hash รหัสผ่านด้วย bcrypt และตรวจสอบรหัสผ่านกับ bcrypt hash ทั้งหมดในเบราว์เซอร์ของคุณ