Skip to content
D DocNectar

Free JWT Generator

Generate a signed JSON Web Token (JWT) from a payload, secret, and algorithm.

100% Free No Signup Works on all devices

Last updated October 5, 2026 · Report an error

Thanks for rating!

JSON Web Tokens are the backbone of modern stateless authentication, but hand-building the base64url-encoded header, payload, and HMAC signature correctly is fiddly to do manually. This generator builds a complete, correctly signed JWT from a JSON payload, secret key, and HMAC algorithm, with a full step-by-step solution.

How it works

Enter your JSON payload, a secret key, and choose an HMAC algorithm (HS256, HS384, or HS512). Optionally set an expiration time. The generator base64url-encodes the header and payload, signs the result with HMAC using your secret, and assembles the final token.

  1. Enter payload (JSON).
  2. Enter secret key.
  3. Enter algorithm.
  4. Enter expires in (minutes, optional).
  5. Click Calculate to see your results.

Examples

A simple signed token

A payload of {"sub": "1234567890", "name": "John Doe"} signed with HS256 produces a three-part token: header.payload.signature.

Who should use it

  • Generating a test JWT for developing or debugging an API that requires token-based authentication.
  • Learning how JWT structure and signing works for educational purposes.

Industry applications

  • API authentication and authorization systems
  • Software development and testing

Advantages

  • Supports all three standard HMAC algorithms (HS256, HS384, HS512).
  • Optionally adds standard iat/exp claims automatically when an expiration is set.

Limitations

  • Only supports HMAC (symmetric secret) signing, not RSA/ECDSA (asymmetric key pair) algorithms.

Common mistakes to avoid

  • Using a real production secret key with any online generator — always use a throwaway test secret and rotate real secrets that may have been exposed.
  • Forgetting that JWTs are signed, not encrypted — anyone can decode and read the payload without the secret, they just can't forge a valid signature without it.

Best practices

  • Never store sensitive data directly in a JWT payload, since the payload is only base64-encoded (readable by anyone), not encrypted.

Tips

  • For production systems, generate and rotate secrets using a proper secrets manager rather than any online tool, and prefer a strong, randomly generated secret of sufficient length.

Frequently asked questions

Yes, with no signup and no limit on how many tokens you generate.
The signing happens as a one-time calculation to produce your token; treat any secret you test with here as no longer private, and never paste a real production secret into any online tool.
They're the same HMAC signing approach using different SHA-2 hash sizes (256, 384, or 512 bits) — HS256 is the most common default, while HS384/HS512 offer a larger signature at a small performance cost.
"iat" (issued at) is the timestamp the token was created, and "exp" (expiration) is the timestamp after which the token should be considered invalid — both are added automatically when you set an expiration time.

Get new calculators and guides in your inbox

No spam — just new tools like JWT Generator and practical guides.

Favorites