JWT Generator
Sign a JWT with HS256/384/512, a custom payload, expiry, issuer, and subject — right in your browser.
About this tool
The JWT Generator builds and signs a JSON Web Token using HMAC-based algorithms (HS256, HS384, or HS512), giving you a working token to paste into an Authorization header, a Postman request, or a test fixture without spinning up a backend. Enter a secret key, a JSON payload, and optional claims, and get back a fully signed, three-part JWT along with a decoded preview of its header and payload so you can verify exactly what was encoded.
Signing uses jose, a modern, spec-compliant JOSE (JSON Object Signing and Encryption) library built on the Web Crypto API — the same underlying cryptographic primitives browsers use for TLS. You can set an expiry from a dropdown (1 hour, 24 hours, 7 days, 30 days, or no expiry) which is translated into the standard exp claim, along with optional issuer (iss) and subject (sub) claims. The payload textarea accepts any JSON object; it's validated before signing so a typo produces a clear parse error instead of a broken token.
This tool exists for development and testing convenience: mocking an authenticated API request, testing a JWT-verification middleware with a known secret, or exploring how JWT claims and signatures work without external tooling. It is explicitly not meant for production authentication — the token is generated client-side with a secret you typed into a web page, which is fine for local development and testing but is never appropriate for issuing real user credentials.
Everything runs in your browser using jose's Web Crypto-backed signing — no request is made and no secret or payload is transmitted anywhere.
