JWT Generator

Generate JWT tokens with custom claims and HMAC-SHA256 signing — for testing, mocking, and development.

About JWT Generator

This tool generates signed JWT tokens using HMAC-SHA256 (HS256), HS384, or HS512 algorithms directly in your browser via the Web Crypto API. It is designed for development and testing purposes — generating mock tokens for API testing, creating sample tokens for documentation, and learning how JWT signing works.

The generated token includes standard claims (iss, sub, iat, exp) plus any custom claims you add in the payload JSON. The signature is computed using HMAC with your provided secret key, making the token verifiable by any JWT library using the same secret. For production use, always generate tokens server-side and protect your signing secrets.

FAQ

Should I use this for production tokens?
No. This tool is for development and testing only. Production JWTs should be generated server-side where the signing secret is protected. Never expose your JWT signing secret to the browser or client-side code.
What is the difference between HS256 and RS256?
HS256 uses a shared secret for both signing and verification (symmetric). RS256 uses a private key for signing and a public key for verification (asymmetric) — better for multi-service architectures where you want services to verify tokens without being able to create them.