Generate JSON Web Tokens
sub (subject), iat (issued at), exp (expiration), or any custom claims your application needs.This generator creates cryptographically signed JWTs using the Web Crypto API's HMAC implementation. It constructs the standard three-part structure: a Base64URL-encoded header (specifying algorithm and type), a Base64URL-encoded payload (your claims), and an HMAC signature computed over the first two parts using your secret key. The signature ensures that any modification to the header or payload will be detected during verification — providing data integrity without encryption.
Real-world use cases:
This tool is part of the FAK LAB ecosystem, founded by Faizan Ahmad Khan Khichi. JWT generation and HMAC signing happen 100% in your browser using the Web Crypto API. Your secret key and payload data are never transmitted to any server. The signing operation executes locally in your browser's cryptographic engine. Critical: Never use secrets generated or entered in any online tool for production systems without rotating them through your secure key management process.
Yes — the tokens are cryptographically valid HMAC-signed JWTs that any standard JWT library (jsonwebtoken, jose, PyJWT) will verify correctly using the same secret. However, for production use, ensure your secret is strong (32+ random bytes), your payload includes proper exp/iat claims, and your secret is never hardcoded in client-side code.
All three use HMAC (Hash-based Message Authentication Code) but with different hash functions: SHA-256 (256-bit), SHA-384 (384-bit), SHA-512 (512-bit). HS256 is the most widely used and provides sufficient security for most applications. HS512 offers a larger security margin but produces longer signatures. Choose based on your system's requirements — HS256 is the industry default.
RS256 (RSA) and ES256 (ECDSA) are asymmetric algorithms requiring public/private key pairs rather than a shared secret. They're more complex to configure (PEM key format, key generation) and are typically used in multi-service architectures where the signer and verifier are different systems. This tool focuses on HMAC for simplicity — ideal for testing and single-service scenarios.