สร้าง JWT
สร้าง JSON Web Tokens (JWT) ที่ลงนามด้วย HS256 โดยใช้ WebCrypto API ในเบราว์เซอร์
Header
Payload
Quick-add standard claims:
Signature
Use a strong, random secret of at least 32 characters for HS256.
base64UrlEncode(header) + "." +
base64UrlEncode(payload),
your-secret-key
)
Generated Token
About JWT
- •JWTs consist of three Base64URL-encoded parts separated by dots.
- •HS256 uses a shared secret — keep it safe on your server.
- •The payload is readable by anyone — do not store passwords or PII.
- •Always set an
expclaim to limit token lifetime.
JWT Generator — Create Signed JSON Web Tokens
Generate signed JSON Web Tokens (JWT) with HS256 using the Web Crypto API, right in your browser. Choose your payload claims, set expiry, and get a signed token — no server needed.
JWT structure explained
Header
Algorithm and token type. Example: { "alg": "HS256", "typ": "JWT" }
Payload
Claims about the user or session. Standard claims: sub, iat, exp, iss. You can add custom fields.
Signature
HMAC-SHA256 of base64(header).base64(payload) signed with your secret key. Prevents tampering.
Full token
Three Base64URL-encoded parts joined by dots: header.payload.signature.
FAQ
What is a JWT?
A JSON Web Token is a compact, URL-safe token for securely transmitting claims between parties. It's widely used for authentication — the server issues a JWT on login, and the client includes it in subsequent requests.
Is JWT the same as an API key?
No. API keys are opaque random strings. JWTs are self-contained and carry verifiable claims (user ID, roles, expiry) without a database lookup on each request.
Is it safe to test JWTs in a browser tool?
Yes for testing. Never use your real production secret key in any online tool. Use a separate test key when experimenting.
สำรวจต่อ
เครื่องมือนักพัฒนา อื่นๆ ที่คุณอาจชอบ...
จัดรูปแบบ JSON
จัดรูปแบบ ตรวจสอบ และย่อข้อมูล JSON พร้อม syntax highlighting
เข้ารหัส/ถอดรหัส Base64
เข้ารหัสข้อความเป็น Base64 และถอดรหัสสตริง Base64
เข้ารหัส/ถอดรหัส URL
เข้ารหัสและถอดรหัสส่วนประกอบ URL และ query strings
สร้าง UUID
สร้างตัวระบุ UUID v4 แบบสุ่ม
สร้าง Hash
สร้างแฮช MD5, SHA-1, SHA-256 และ SHA-512 จากข้อความ
ทดสอบ Regex
ทดสอบและดีบัก regular expressions พร้อมไฮไลท์การจับคู่
ถอดรหัส JWT
ถอดรหัสและตรวจสอบ header และ payload ของ JWT token
จัดรูปแบบ HTML
จัดรูปแบบโค้ด HTML พร้อมการเยื้องที่เหมาะสม