JWT Generator & Decoder
Generate signed JWT tokens with HS256/HS384/HS512, or decode any JWT to inspect its header and payload. Browser-only, nothing sent to any server.
How JWT Generator Works
Edit header & payload
The header and payload are pre-filled with sensible defaults. Edit them as valid JSON — add custom claims, change the expiration, or adjust the algorithm.
Enter secret & generate
Type your signing secret, choose HS256, HS384 or HS512, and click Generate JWT. The header alg field updates automatically when you switch algorithms.
Copy the token
Copy the generated JWT to clipboard. The three parts are colour-coded (red = header, purple = payload, blue = signature) so you can see the structure at a glance.
Key Features
HS256, HS384 & HS512
Choose any HMAC-based signing algorithm. The header alg field syncs automatically so the generated token is always self-consistent.
Decode any JWT
Switch to Decode mode and paste any JWT to see its header and payload decoded as formatted JSON — useful for inspecting tokens from your API.
Web Crypto API signing
HMAC signing uses crypto.subtle.sign() — the browser's native cryptographic API. Your secret and the generated token never leave your device.
Editable header & payload
Both the header and payload are fully editable JSON fields. Add custom claims, set an expiration, or change the subject without leaving the page.
Decode-only disclaimer
The decoder shows header and payload without verifying the signature. A clear notice reminds you to always verify signatures server-side before trusting claims.
Instant generation
Token generation is asynchronous but near-instant. Large payloads do not slow generation — HMAC signing is fast regardless of payload size.